tool¶
openai model.
Functions
Get an openai langchain base chat model. |
- get_openai(model='gpt-4o', api_key=None, temperature=0, max_tokens=None, timeout=None, max_retries=2, **kwargs)[source]¶
Get an openai langchain base chat model.
- Parameters:
model (
str
) – Name of the model to use.api_key (
Optional
[str
]) – Api key (if not provided the user is prompted for it).temperature (
int
) – Temperature.max_tokens (
Optional
[int
]) – Max number of tokens.timeout (
Optional
[int
]) – Timeout.max_retries (
int
) – Max retries.kwargs – Optional key value arguments.
- Return type:
BaseChatModel
- Returns:
An openai langchain base chat model.