langgraph_agent_toolkit.core.models.chat_openai module
- class langgraph_agent_toolkit.core.models.chat_openai.AzureChatOpenAIPatched(*args, name=None, cache=None, verbose=<factory>, callbacks=None, tags=None, metadata=None, custom_get_token_ids=None, rate_limiter=None, disable_streaming=False, output_version=<factory>, profile=None, client=None, async_client=None, root_client=None, root_async_client=None, model=None, temperature=None, model_kwargs=<factory>, api_key=<factory>, base_url=None, organization=None, openai_proxy=<factory>, timeout=None, stream_usage=None, max_retries=None, presence_penalty=None, frequency_penalty=None, seed=None, logprobs=None, top_logprobs=None, logit_bias=None, streaming=False, n=None, top_p=None, max_completion_tokens=None, reasoning_effort=None, reasoning=None, verbosity=None, tiktoken_model_name=None, default_headers=None, default_query=None, http_client=None, http_async_client=None, http_socket_options=None, stream_chunk_timeout=<factory>, stop_sequences=None, extra_body=None, include_response_headers=False, disabled_params=None, context_management=None, include=None, prompt_cache_options=None, service_tier=None, store=None, truncation=None, use_previous_response_id=False, use_responses_api=None, azure_endpoint=<factory>, azure_deployment=None, api_version=<factory>, azure_ad_token=<factory>, azure_ad_token_provider=None, azure_ad_async_token_provider=None, model_version='', openai_api_type=<factory>, validate_base_url=True)[source][source]
Bases:
_StreamCompatibility,AzureChatOpenAIPreserve refusal text and normalize transport failures in Azure streams.
- Parameters:
args (Any)
name (str | None)
cache (BaseCache | bool | None)
verbose (bool)
callbacks (list[BaseCallbackHandler] | BaseCallbackManager | None)
tags (list[str] | None)
metadata (dict[str, Any] | None)
custom_get_token_ids (Callable[[str], list[int]] | None)
rate_limiter (BaseRateLimiter | None)
disable_streaming (bool | Literal['tool_calling'])
output_version (str | None)
profile (ModelProfile | None)
client (Any)
async_client (Any)
root_client (Any)
root_async_client (Any)
model (str | None)
temperature (float | None)
model_kwargs (dict[str, Any])
api_key (SecretStr | None)
base_url (str | None)
organization (str | None)
openai_proxy (str | None)
timeout (float | tuple[float, float] | Any | None)
stream_usage (bool | None)
max_retries (int | None)
presence_penalty (float | None)
frequency_penalty (float | None)
seed (int | None)
logprobs (bool | None)
top_logprobs (int | None)
logit_bias (dict[int, int] | None)
streaming (bool)
n (int | None)
top_p (float | None)
max_completion_tokens (int | None)
reasoning_effort (str | None)
reasoning (dict[str, Any] | None)
verbosity (str | None)
tiktoken_model_name (str | None)
default_headers (Mapping[str, str] | None)
default_query (Mapping[str, object] | None)
http_client (Any | None)
http_async_client (Any | None)
http_socket_options (Sequence[tuple[int, int, int]] | None)
stream_chunk_timeout (float | None)
stop_sequences (list[str] | str | None)
extra_body (Mapping[str, Any] | None)
include_response_headers (bool)
disabled_params (dict[str, Any] | None)
context_management (list[dict[str, Any]] | None)
include (list[str] | None)
prompt_cache_options (dict[str, Any] | None)
service_tier (str | None)
store (bool | None)
truncation (str | None)
use_previous_response_id (bool)
use_responses_api (bool | None)
azure_endpoint (str | None)
azure_deployment (str | None)
api_version (str | None)
azure_ad_token (SecretStr | None)
azure_ad_token_provider (Callable[[], str] | None)
azure_ad_async_token_provider (Callable[[], Awaitable[str]] | None)
model_version (str)
openai_api_type (str | None)
validate_base_url (bool)
- model_config = {'arbitrary_types_allowed': True, 'extra': 'ignore', 'populate_by_name': True, 'protected_namespaces': (), 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class langgraph_agent_toolkit.core.models.chat_openai.ChatOpenAIPatched(*args, name=None, cache=None, verbose=<factory>, callbacks=None, tags=None, metadata=None, custom_get_token_ids=None, rate_limiter=None, disable_streaming=False, output_version=<factory>, profile=None, client=None, async_client=None, root_client=None, root_async_client=None, model='gpt-3.5-turbo', temperature=None, model_kwargs=<factory>, api_key=None, base_url=None, organization=None, openai_proxy=<factory>, timeout=None, stream_usage=None, max_retries=None, presence_penalty=None, frequency_penalty=None, seed=None, logprobs=None, top_logprobs=None, logit_bias=None, streaming=False, n=None, top_p=None, max_completion_tokens=None, reasoning_effort=None, reasoning=None, verbosity=None, tiktoken_model_name=None, default_headers=None, default_query=None, http_client=None, http_async_client=None, http_socket_options=None, stream_chunk_timeout=<factory>, stop_sequences=None, extra_body=None, include_response_headers=False, disabled_params=None, context_management=None, include=None, prompt_cache_options=None, service_tier=None, store=None, truncation=None, use_previous_response_id=False, use_responses_api=None)[source][source]
Bases:
_StreamCompatibility,ChatOpenAI- Parameters:
args (Any)
name (str | None)
cache (BaseCache | bool | None)
verbose (bool)
callbacks (list[BaseCallbackHandler] | BaseCallbackManager | None)
tags (list[str] | None)
metadata (dict[str, Any] | None)
custom_get_token_ids (Callable[[str], list[int]] | None)
rate_limiter (BaseRateLimiter | None)
disable_streaming (bool | Literal['tool_calling'])
output_version (str | None)
profile (ModelProfile | None)
client (Any)
async_client (Any)
root_client (Any)
root_async_client (Any)
model (str)
temperature (float | None)
model_kwargs (dict[str, Any])
api_key (SecretStr | None | Callable[[], str] | Callable[[], Awaitable[str]])
base_url (str | None)
organization (str | None)
openai_proxy (str | None)
timeout (float | tuple[float, float] | Any | None)
stream_usage (bool | None)
max_retries (int | None)
presence_penalty (float | None)
frequency_penalty (float | None)
seed (int | None)
logprobs (bool | None)
top_logprobs (int | None)
logit_bias (dict[int, int] | None)
streaming (bool)
n (int | None)
top_p (float | None)
max_completion_tokens (int | None)
reasoning_effort (str | None)
reasoning (dict[str, Any] | None)
verbosity (str | None)
tiktoken_model_name (str | None)
default_headers (Mapping[str, str] | None)
default_query (Mapping[str, object] | None)
http_client (Any | None)
http_async_client (Any | None)
http_socket_options (Sequence[tuple[int, int, int]] | None)
stream_chunk_timeout (float | None)
stop_sequences (list[str] | str | None)
extra_body (Mapping[str, Any] | None)
include_response_headers (bool)
disabled_params (dict[str, Any] | None)
context_management (list[dict[str, Any]] | None)
include (list[str] | None)
prompt_cache_options (dict[str, Any] | None)
service_tier (str | None)
store (bool | None)
truncation (str | None)
use_previous_response_id (bool)
use_responses_api (bool | None)
- model_config = {'arbitrary_types_allowed': True, 'extra': 'ignore', 'populate_by_name': True, 'protected_namespaces': (), 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].