You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llm-bedrock/src/lib.rs
+52Lines changed: 52 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,58 @@ impl ExtendedGuest for BedrockComponent {
63
63
}
64
64
}
65
65
66
+
fnretry_prompt(
67
+
original_messages:&[Message],
68
+
partial_result:&[llm::StreamDelta],
69
+
) -> Vec<Message>{
70
+
letmut extended_messages = Vec::new();
71
+
extended_messages.push(Message{
72
+
role: llm::Role::System,
73
+
name:None,
74
+
content:vec![
75
+
llm::ContentPart::Text(
76
+
"You were asked the same question previously, but the response was interrupted before completion. \
77
+
Please continue your response from where you left off. \
78
+
Do not include the part of the response that was already seen. If the response starts with a new word and no punctuation then add a space to the beginning".to_string()),
0 commit comments