We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23d7178 commit 8306130Copy full SHA for 8306130
libs/langchain-anthropic/src/chat_models.ts
@@ -546,13 +546,13 @@ export class ChatAnthropicMessages<
546
type: "text" as const, // Explicitly setting the type as "text"
547
text: contentPart.text,
548
};
549
- } else if (contentPart.type === "tool_use") {
+ } else if (
550
+ contentPart.type === "tool_use" ||
551
+ contentPart.type === "tool_result"
552
+ ) {
553
// TODO: Fix when SDK types are fixed
554
return {
- type: "tool_use" as const,
- id: contentPart.id,
- name: contentPart.name,
555
- input: contentPart.input,
+ ...contentPart,
556
// eslint-disable-next-line @typescript-eslint/no-explicit-any
557
} as any;
558
} else {
0 commit comments