Replies: 1 comment
-
Hey @pletinsky! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this together! The latest version of Here is an example of how to create an assistant using an existing from langchain_experimental.openai_assistant import OpenAIAssistantRunnable
# Create an assistant using an existing assistant_id
assistant = OpenAIAssistantRunnable(
assistant_id="your_existing_assistant_id",
model="gpt-4-1106-preview"
)
# Invoke the assistant with some input
output = assistant.invoke({"content": "What's 10 - 4 raised to the 2.7"})
print(output) In your example code, you should pass the agent = OpenAIAssistantV2Runnable(
assistant_id="e2b_tool",
name="langchain assistant e2b tool",
instructions="You are a personal math tutor. Write and run code to answer math questions.",
tools=tools,
model="gpt-4-1106-preview",
as_agent=True
) This will allow you to reuse an existing assistant with the specified |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I see the latest version of OpenAIAssistantV2Runnable in the dev build does not support custom assistant_id.
But it's absolutely necessary to support it to reuse existing assistants.
Does anyone know if this feature is expected or not?
System Info
python 3.12, macos
Beta Was this translation helpful? Give feedback.
All reactions