langgraph
langgraph copied to clipboard
[Question] How to use OpenAIAssistantRunnable on langgraph?
Hello,
I would like to use OpenAIAssistantRunnable with langgraph, but I faced an error.
I create an assistant as following:
assistant = OpenAIAssistantRunnable.create_assistant( name=name, instructions=instructions, tools=tools, model="gpt-4-1106-preview", assistant_id="asst_kqRc9iTKmgv3j5Usr0ulcYSf", streaming=True )
After that I create an agent note:
agent = RunnablePassthrough.assign( agent_outcome = assistant )
Then I use this agent on sample code of langgraph,
but i faced an error as following:
File "/home/thiepnq/Sample/graph.py", line 50, in execute_tools tool_to_use = {t.name: t for t in tools}[agent_action.tool] AttributeError: 'list' object has no attribute 'tool'
Could you help me to solve this issue.
Hi @nqthiep , Could you share more of your code? It looks like the issue may be that the ToolExecutor node isn't being initialized correctly, but I'm not sure from what has been shared so far
Closing as stale