-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The validation of tools within OpenAIAssistantRunnable.create_assistant does not account for {"type": "code_interpreter"}
.
#19057
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
🔌: openai
Primarily related to OpenAI integrations
Ɑ: Runnables
Related to Runnables
Comments
dosubot
bot
added
Ɑ: Runnables
Related to Runnables
🔌: openai
Primarily related to OpenAI integrations
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
labels
Mar 14, 2024
fmyblack
changed the title
The validation of tools within OpenAIAssistantRunnable.create_assistant does not account for {"type": "code_interpreter"}.
The validation of tools within OpenAIAssistantRunnable.create_assistant does not account for Mar 14, 2024
{"type": "code_interpreter"}
.
Same here, I am also facing this issue in latest langchain version, it was working fine last week. Any update? |
ccurme
added a commit
that referenced
this issue
Mar 22, 2024
Should be closed in #19081 |
rahul-trip
pushed a commit
to daxa-ai/langchain
that referenced
this issue
Mar 27, 2024
…i#19081) - **Description:** OpenAI assistants support some pre-built tools (e.g., `"retrieval"` and `"code_interpreter"`) and expect these as `{"type": "code_interpreter"}`. This may have been upset by langchain-ai#18935 - **Issue:** langchain-ai#19057
bechbd
pushed a commit
to bechbd/langchain
that referenced
this issue
Mar 29, 2024
…i#19081) - **Description:** OpenAI assistants support some pre-built tools (e.g., `"retrieval"` and `"code_interpreter"`) and expect these as `{"type": "code_interpreter"}`. This may have been upset by langchain-ai#18935 - **Issue:** langchain-ai#19057
gkorland
pushed a commit
to FalkorDB/langchain
that referenced
this issue
Mar 30, 2024
…i#19081) - **Description:** OpenAI assistants support some pre-built tools (e.g., `"retrieval"` and `"code_interpreter"`) and expect these as `{"type": "code_interpreter"}`. This may have been upset by langchain-ai#18935 - **Issue:** langchain-ai#19057
chrispy-snps
pushed a commit
to chrispy-snps/langchain
that referenced
this issue
Mar 30, 2024
…i#19081) - **Description:** OpenAI assistants support some pre-built tools (e.g., `"retrieval"` and `"code_interpreter"`) and expect these as `{"type": "code_interpreter"}`. This may have been upset by langchain-ai#18935 - **Issue:** langchain-ai#19057
chrispy-snps
pushed a commit
to chrispy-snps/langchain
that referenced
this issue
Mar 30, 2024
…i#19081) - **Description:** OpenAI assistants support some pre-built tools (e.g., `"retrieval"` and `"code_interpreter"`) and expect these as `{"type": "code_interpreter"}`. This may have been upset by langchain-ai#18935 - **Issue:** langchain-ai#19057
hinthornw
pushed a commit
that referenced
this issue
Apr 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
🔌: openai
Primarily related to OpenAI integrations
Ɑ: Runnables
Related to Runnables
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
File "xxx/t.py", line 43, in
interpreter_assistant = OpenAIAssistantRunnable.create_assistant(
File "xxx/site-packages/langchain/agents/openai_assistant/base.py", line 213, in create_assistant
tools=[convert_to_openai_tool(tool) for tool in tools], # type: ignore
File "xxx/langchain/agents/openai_assistant/base.py", line 213, in
tools=[convert_to_openai_tool(tool) for tool in tools], # type: ignore
File "xxx/langchain_core/utils/function_calling.py", line 329, in convert_to_openai_tool
function = convert_to_openai_function(tool)
File "xxx/langchain_core/utils/function_calling.py", line 304, in convert_to_openai_function
raise ValueError(
ValueError: Unsupported function
{'type': 'code_interpreter'}
Functions must be passed in as Dict, pydantic.BaseModel, or Callable. If they're a dict they must either be in OpenAI function format or valid JSON schema with top-level 'title' and 'description' keys.
Description
I used the example code, but it threw an error when executed.
example code from https://python.langchain.com/docs/modules/agents/agent_types/openai_assistants#using-only-openai-tools
System Info
$ pip list | grep langchain
langchain 0.1.12
langchain-community 0.0.28
langchain-core 0.1.31
langchain-openai 0.0.8
langchain-text-splitters 0.0.1
The text was updated successfully, but these errors were encountered: