Skip to content

Commit

Permalink
Added temperture and top to be passed via model_kwargs.
Browse files Browse the repository at this point in the history
Added extra_body to be passed.
  • Loading branch information
luiz0992 committed Oct 15, 2024
1 parent f3925d7 commit 6e04618
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ def create_assistant(
tools: Sequence[Union[BaseTool, dict]],
model: str,
*,
model_kwargs: dict[str, float] = {},
client: Optional[Union[openai.OpenAI, openai.AzureOpenAI]] = None,
tool_resources: Optional[Union[AssistantToolResources, dict, NotGiven]] = None,
extra_body: Optional[object] = None,
**kwargs: Any,
) -> OpenAIAssistantRunnable:
"""Create an OpenAI Assistant and instantiate the Runnable.
Expand Down Expand Up @@ -257,6 +259,8 @@ def create_assistant(
tools=[_get_assistants_tool(tool) for tool in tools], # type: ignore
tool_resources=tool_resources,
model=model,
extra_body = extra_body,
**model_kwargs,
)
return cls(assistant_id=assistant.id, client=client, **kwargs)

Expand Down

0 comments on commit 6e04618

Please sign in to comment.