mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-04 12:18:24 +00:00
langchain: creating assistants with file_ids (#19199)
Changing OpenAIAssistantRunnable.create_assistant to send the `file_ids` parameter to openai.beta.assistants.create Co-authored-by: Frederico Wu <fred.diaswu@coxautoinc.com>
This commit is contained in:
parent
9b2f9ee952
commit
f36418a5b0
@ -212,6 +212,7 @@ class OpenAIAssistantRunnable(RunnableSerializable[Dict, OutputType]):
|
|||||||
instructions=instructions,
|
instructions=instructions,
|
||||||
tools=[convert_to_openai_tool(tool) for tool in tools], # type: ignore
|
tools=[convert_to_openai_tool(tool) for tool in tools], # type: ignore
|
||||||
model=model,
|
model=model,
|
||||||
|
file_ids=kwargs.get("file_ids"),
|
||||||
)
|
)
|
||||||
return cls(assistant_id=assistant.id, client=client, **kwargs)
|
return cls(assistant_id=assistant.id, client=client, **kwargs)
|
||||||
|
|
||||||
@ -333,6 +334,7 @@ class OpenAIAssistantRunnable(RunnableSerializable[Dict, OutputType]):
|
|||||||
instructions=instructions,
|
instructions=instructions,
|
||||||
tools=openai_tools, # type: ignore
|
tools=openai_tools, # type: ignore
|
||||||
model=model,
|
model=model,
|
||||||
|
file_ids=kwargs.get("file_ids"),
|
||||||
)
|
)
|
||||||
return cls(assistant_id=assistant.id, async_client=async_client, **kwargs)
|
return cls(assistant_id=assistant.id, async_client=async_client, **kwargs)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user