langchain-ai / langchain-aws

Build LangChain Applications on AWS
MIT License
63 stars 46 forks source link

Fixes a problem with tools not working with the new converse endpoint using anthropic models #76

Open userlerueda opened 2 weeks ago

userlerueda commented 2 weeks ago

This PR addresses the following problems found while testing the new converse endpoint with anthropic tools:

With these changes, I was able to run the https://python.langchain.com/v0.1/docs/use_cases/tool_use/multiple_tools/ example with bedrock, using anthropic.

{
  "input": "Take 3 to the fifth power and multiply that by the sum of twelve and three, then square the whole result",
  "conversation_id": null,
  "chat_history": [],
  "output": [
    {
      "type": "text",
      "text": "So the final result of taking 3 to the 5th power (243), multiplying by 12 + 3 (15) to get 3645, and then squaring that is 13286025.",
      "index": 0
    }
  ]
}