Skip to content

Commit 37b60d5

Browse files
committed
Pass response ID to the response json to make it compatible with bespoken
1 parent 6ec1d60 commit 37b60d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llm_bedrock_anthropic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ def execute(self, prompt, stream, response, conversation):
588588
# so what we do instead is put what would be the system prompt in the first line of the
589589
# `Human` prompt, as recommended in the documentation. This enables us to effectively use the
590590
# `-s`, `-t` and `--save` flags.
591+
print(response.response_json)
591592
bedrock_model_id = prompt.options.bedrock_model_id or self.model_id
592593

593594
if prompt.system and self.model_id in [
@@ -602,6 +603,7 @@ def execute(self, prompt, stream, response, conversation):
602603
# Preserve the Bedrock-specific user content dict, so it can be re-used in
603604
# future conversations.
604605
response.response_json = {
606+
'id': response.id,
605607
'bedrock_user_content': self.encode_bytes(prompt_content)
606608
}
607609

0 commit comments

Comments
 (0)