langchain-ai / langchain-databricks

MIT License
4 stars 7 forks source link

Fix 'any' tool_choice handling in bind_tools #27

Closed B-Step62 closed 2 weeks ago

B-Step62 commented 2 weeks ago

LangChain bind_tools accept any but OpenAI API does not recognize it. ChatOpenAI handles this by replacing any with required. This PR adds that handling to be compatible with OpenAI spec.

Test