Skip to content

Commit

Permalink
langchain: creating assistants with file_ids (langchain-ai#19199)
Browse files Browse the repository at this point in the history
Changing OpenAIAssistantRunnable.create_assistant to send the `file_ids`
parameter to openai.beta.assistants.create

Co-authored-by: Frederico Wu <[email protected]>
  • Loading branch information
fredericowu and Frederico Wu authored Mar 19, 2024
1 parent 9b2f9ee commit f36418a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/langchain/langchain/agents/openai_assistant/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def create_assistant(
instructions=instructions,
tools=[convert_to_openai_tool(tool) for tool in tools], # type: ignore
model=model,
file_ids=kwargs.get("file_ids"),
)
return cls(assistant_id=assistant.id, client=client, **kwargs)

Expand Down Expand Up @@ -333,6 +334,7 @@ async def acreate_assistant(
instructions=instructions,
tools=openai_tools, # type: ignore
model=model,
file_ids=kwargs.get("file_ids"),
)
return cls(assistant_id=assistant.id, async_client=async_client, **kwargs)

Expand Down

0 comments on commit f36418a

Please sign in to comment.