Skip to content

Commit 1325178

Browse files
authored
fix: stringify all tool results for anthropic on bedrock (#1786)
1 parent 299008b commit 1325178

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/stale-moles-serve.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@llamaindex/community": patch
3+
---
4+
5+
fix: stringify all tool results for anthropic on bedrock

packages/community/src/llm/bedrock/anthropic/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const mapChatMessagesToAnthropicMessages = <
111111
{
112112
type: "tool_result",
113113
tool_use_id: msg.options.toolResult.id,
114-
content: msg.options.toolResult.result,
114+
content: JSON.stringify(msg.options.toolResult.result),
115115
},
116116
],
117117
},

0 commit comments

Comments
 (0)