Open rabader opened 4 weeks ago
Hello, thanks for this. Would you mind sharing what version of the openai
Python sdk you are using?
Hello, thanks for this. Would you mind sharing what version of the
openai
Python sdk you are using?
Just added that above. It's 1.27.0
I'll also add that I just tried running this with the latest version of the openai SDK (1.35.4) and got the same error.
Are you sure you've updated the sdk in the correct python environment (and refreshed your jupyter kernel if you're in a notebook)? "required" is definitely a supported tool_choice value in the latest sdk https://github.com/openai/openai-python/blob/main/src/openai/types/chat/chat_completion_tool_choice_option_param.py
Are you sure you've updated the sdk in the correct python environment (and refreshed your jupyter kernel if you're in a notebook)? "required" is definitely a supported tool_choice value in the latest sdk https://github.com/openai/openai-python/blob/main/src/openai/types/chat/chat_completion_tool_choice_option_param.py
Hmmm, I've been using my enterptise' internal OpenAI-compatible API, but looking at their code, it looks like they're currently working off of openai==1.10.0. I guess that's the problem, regardless of what I have installed in my env.
Checked other resources
Example Code
code from this link: https://python.langchain.com/v0.1/docs/use_cases/query_analysis/techniques/routing/
Error Message and Stack Trace (if applicable)
Description
When using the routing example shown in the langchain docs, it only works if the "langchain-openai" version is 0.1.8 or lower. The newest versions (0.1.9+) break this logic. Routers are used in my workflow and this is preventing me from upgrading my packages. Please either revert the breaking changes or provide new documentation to support this type of routing functionality.
System Info
langchain ==0.2.3 langchain-chroma ==0.1.1 langchain-community ==0.2.0 langchain-core ==0.2.3 langchain-experimental ==0.0.59 langchain-google-genai ==1.0.4 langchain-google-vertexai ==1.0.4 langchain-openai ==0.1.10 langchain-text-splitters ==0.2.0 langchainhub ==0.1.15 langgraph ==0.1.1 openai ==1.27.0
platform: windows python version 3.10.10