Skip to content

Commit

Permalink
Merge pull request langchain-ai#140 from langchain-ai/brace/force-too…
Browse files Browse the repository at this point in the history
…l-use-reflections

fix: Force reflections tool usage
  • Loading branch information
bracesproul authored Oct 25, 2024
2 parents 81eca24 + ee8786b commit cc14905
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/agent/reflection/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export const reflect = async (
const model = new ChatAnthropic({
model: "claude-3-5-sonnet-20240620",
temperature: 0,
}).bindTools([generateReflectionTool]);
}).bindTools([generateReflectionTool], {
tool_choice: "generate_reflections",
});

const currentArtifactContent = state.artifact
? getArtifactContent(state.artifact)
Expand Down

0 comments on commit cc14905

Please sign in to comment.