autogen_ext.models.openai.config#

class JSONSchema[源]#

基类:TypedDict

name: Required[str]#

响应格式的名称。必须是 a-z、A-Z、0-9,或包含下划线和连字符,最大长度为 64。

description: str#

对响应格式用途的描述,模型用它来确定如何以该格式响应。

schema: Dict[str, object]#

响应格式的模式,描述为一个 JSON Schema 对象。

strict: bool | None#

生成输出时是否启用严格的模式遵循。如果设置为 true,模型将始终遵循 schema 字段中定义的精确模式。当 stricttrue 时,只支持 JSON Schema 的一个子集。要了解更多信息,请阅读 [结构化输出指南](https://platform.openai.com/docs/guides/structured-outputs)。

class ResponseFormat[源]#

基类:TypedDict

type: Literal['text', 'json_object', 'json_schema']#

textjson_objectjson_schema

类型:

正在定义的响应格式类型

json_schema: JSONSchema | None#

json_schema

类型:

正在定义的响应格式类型

class StreamOptions[源]#

基类:TypedDict

include_usage: bool#
class CreateArguments[源]#

基类:TypedDict

frequency_penalty: float | None#
logit_bias: Dict[str, int] | None#
max_tokens: int | None#
n: int | None#
presence_penalty: float | None#
response_format: ResponseFormat#
seed: int | None#
stop: str | None | List[str]#
temperature: float | None#
top_p: float | None#
user: str#
stream_options: StreamOptions | None#
parallel_tool_calls: bool | None#
reasoning_effort: Literal['minimal', 'low', 'medium', 'high'] | None#

控制模型用于推理的努力程度。仅适用于 o1 和 o3-mini 等推理模型。 - “minimal”:最快响应,推理最少 - “low”:响应更快,推理更少 - “medium”:推理和速度平衡 - “high”:更彻底的推理,可能需要更长时间

class BaseOpenAIClientConfiguration[源]#

基类:CreateArguments

model: str#
api_key: str#
timeout: float | None#
max_retries: int#
model_capabilities: ModelCapabilities#
model_info: ModelInfo#
add_name_prefixes: bool#

模型支持的功能,默认由模型名称决定,但如果传入值则会被覆盖。

include_name_in_message: bool#

是否在用户消息参数中包含“name”字段。默认为 True。对于不支持“name”字段的提供商,请设置为 False。

default_headers: Dict[str, str] | None#
frequency_penalty: float | None#
logit_bias: Dict[str, int] | None#
max_tokens: int | None#
n: int | None#
presence_penalty: float | None#
response_format: ResponseFormat#
seed: int | None#
stop: str | None | List[str]#
temperature: float | None#
top_p: float | None#
user: str#
stream_options: StreamOptions | None#
parallel_tool_calls: bool | None#
reasoning_effort: Literal['minimal', 'low', 'medium', 'high'] | None#
class OpenAIClientConfiguration[源]#

基类:BaseOpenAIClientConfiguration

organization: str#
base_url: str#
frequency_penalty: float | None#
logit_bias: Dict[str, int] | None#
max_tokens: int | None#
n: int | None#
presence_penalty: float | None#
response_format: ResponseFormat#
seed: int | None#
stop: str | None | List[str]#
temperature: float | None#
top_p: float | None#
user: str#
stream_options: StreamOptions | None#
parallel_tool_calls: bool | None#
reasoning_effort: Literal['minimal', 'low', 'medium', 'high'] | None#
model: str#
api_key: str#
timeout: float | None#
max_retries: int#
model_capabilities: ModelCapabilities#
model_info: ModelInfo#
add_name_prefixes: bool#
include_name_in_message: bool#
default_headers: Dict[str, str] | None#
class AzureOpenAIClientConfiguration[源]#

基类:BaseOpenAIClientConfiguration

azure_endpoint: Required[str]#
azure_deployment: str#
api_version: Required[str]#
azure_ad_token: str#
azure_ad_token_provider: Callable[[], str | Awaitable[str]]#
frequency_penalty: float | None#
logit_bias: Dict[str, int] | None#
max_tokens: int | None#
n: int | None#
presence_penalty: float | None#
response_format: ResponseFormat#
seed: int | None#
stop: str | None | List[str]#
temperature: float | None#
top_p: float | None#
user: str#
stream_options: StreamOptions | None#
parallel_tool_calls: bool | None#
reasoning_effort: Literal['minimal', 'low', 'medium', 'high'] | None#
model: str#
api_key: str#
timeout: float | None#
max_retries: int#
model_capabilities: ModelCapabilities#
model_info: ModelInfo#
add_name_prefixes: bool#
include_name_in_message: bool#
default_headers: Dict[str, str] | None#
pydantic model CreateArgumentsConfigModel[源]#

基类: BaseModel

显示 JSON 模式
{
   "title": "CreateArgumentsConfigModel",
   "type": "object",
   "properties": {
      "frequency_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Frequency Penalty"
      },
      "logit_bias": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "integer"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Logit Bias"
      },
      "max_tokens": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Tokens"
      },
      "n": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "N"
      },
      "presence_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Presence Penalty"
      },
      "response_format": {
         "anyOf": [
            {
               "$ref": "#/$defs/ResponseFormat"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "seed": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Seed"
      },
      "stop": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stop"
      },
      "temperature": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Temperature"
      },
      "top_p": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Top P"
      },
      "user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User"
      },
      "stream_options": {
         "anyOf": [
            {
               "$ref": "#/$defs/StreamOptions"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "parallel_tool_calls": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Parallel Tool Calls"
      },
      "reasoning_effort": {
         "anyOf": [
            {
               "enum": [
                  "minimal",
                  "low",
                  "medium",
                  "high"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Reasoning Effort"
      }
   },
   "$defs": {
      "JSONSchema": {
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "schema": {
               "title": "Schema",
               "type": "object"
            },
            "strict": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Strict"
            }
         },
         "required": [
            "name"
         ],
         "title": "JSONSchema",
         "type": "object"
      },
      "ResponseFormat": {
         "properties": {
            "type": {
               "enum": [
                  "text",
                  "json_object",
                  "json_schema"
               ],
               "title": "Type",
               "type": "string"
            },
            "json_schema": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JSONSchema"
                  },
                  {
                     "type": "null"
                  }
               ]
            }
         },
         "required": [
            "type",
            "json_schema"
         ],
         "title": "ResponseFormat",
         "type": "object"
      },
      "StreamOptions": {
         "properties": {
            "include_usage": {
               "title": "Include Usage",
               "type": "boolean"
            }
         },
         "required": [
            "include_usage"
         ],
         "title": "StreamOptions",
         "type": "object"
      }
   }
}

字段:
field frequency_penalty: float | None = None#
field logit_bias: Dict[str, int] | None = None#
field max_tokens: int | None = None#
field n: int | None = None#
字段 presence_penalty: float | None = None#
字段 response_format: ResponseFormat | None = None#
字段 seed: int | None = None#
字段 stop: str | List[str] | None = None#
字段 temperature: float | None = None#
字段 top_p: float | None = None#
字段 user: str | None = None#
字段 stream_options: StreamOptions | None = None#
字段 parallel_tool_calls: bool | None = None#
字段 reasoning_effort: Literal['minimal', 'low', 'medium', 'high'] | None = None#
pydantic 模型 BaseOpenAIClientConfigurationConfigModel[源]#

基类:CreateArgumentsConfigModel

显示 JSON 模式
{
   "title": "BaseOpenAIClientConfigurationConfigModel",
   "type": "object",
   "properties": {
      "frequency_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Frequency Penalty"
      },
      "logit_bias": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "integer"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Logit Bias"
      },
      "max_tokens": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Tokens"
      },
      "n": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "N"
      },
      "presence_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Presence Penalty"
      },
      "response_format": {
         "anyOf": [
            {
               "$ref": "#/$defs/ResponseFormat"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "seed": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Seed"
      },
      "stop": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stop"
      },
      "temperature": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Temperature"
      },
      "top_p": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Top P"
      },
      "user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User"
      },
      "stream_options": {
         "anyOf": [
            {
               "$ref": "#/$defs/StreamOptions"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "parallel_tool_calls": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Parallel Tool Calls"
      },
      "reasoning_effort": {
         "anyOf": [
            {
               "enum": [
                  "minimal",
                  "low",
                  "medium",
                  "high"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Reasoning Effort"
      },
      "model": {
         "title": "Model",
         "type": "string"
      },
      "api_key": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Api Key"
      },
      "timeout": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Timeout"
      },
      "max_retries": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Retries"
      },
      "model_capabilities": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelCapabilities"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "model_info": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelInfo"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "add_name_prefixes": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Add Name Prefixes"
      },
      "include_name_in_message": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Include Name In Message"
      },
      "default_headers": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "string"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Default Headers"
      }
   },
   "$defs": {
      "JSONSchema": {
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "schema": {
               "title": "Schema",
               "type": "object"
            },
            "strict": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Strict"
            }
         },
         "required": [
            "name"
         ],
         "title": "JSONSchema",
         "type": "object"
      },
      "ModelCapabilities": {
         "deprecated": true,
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output"
         ],
         "title": "ModelCapabilities",
         "type": "object"
      },
      "ModelInfo": {
         "description": "ModelInfo is a dictionary that contains information about a model's properties.\nIt is expected to be used in the model_info property of a model client.\n\nWe are expecting this to grow over time as we add more features.",
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            },
            "family": {
               "anyOf": [
                  {
                     "enum": [
                        "gpt-5",
                        "gpt-41",
                        "gpt-45",
                        "gpt-4o",
                        "o1",
                        "o3",
                        "o4",
                        "gpt-4",
                        "gpt-35",
                        "r1",
                        "gemini-1.5-flash",
                        "gemini-1.5-pro",
                        "gemini-2.0-flash",
                        "gemini-2.5-pro",
                        "gemini-2.5-flash",
                        "claude-3-haiku",
                        "claude-3-sonnet",
                        "claude-3-opus",
                        "claude-3-5-haiku",
                        "claude-3-5-sonnet",
                        "claude-3-7-sonnet",
                        "claude-4-opus",
                        "claude-4-sonnet",
                        "llama-3.3-8b",
                        "llama-3.3-70b",
                        "llama-4-scout",
                        "llama-4-maverick",
                        "codestral",
                        "open-codestral-mamba",
                        "mistral",
                        "ministral",
                        "pixtral",
                        "unknown"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "string"
                  }
               ],
               "title": "Family"
            },
            "structured_output": {
               "title": "Structured Output",
               "type": "boolean"
            },
            "multiple_system_messages": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Multiple System Messages"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output",
            "family",
            "structured_output"
         ],
         "title": "ModelInfo",
         "type": "object"
      },
      "ResponseFormat": {
         "properties": {
            "type": {
               "enum": [
                  "text",
                  "json_object",
                  "json_schema"
               ],
               "title": "Type",
               "type": "string"
            },
            "json_schema": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JSONSchema"
                  },
                  {
                     "type": "null"
                  }
               ]
            }
         },
         "required": [
            "type",
            "json_schema"
         ],
         "title": "ResponseFormat",
         "type": "object"
      },
      "StreamOptions": {
         "properties": {
            "include_usage": {
               "title": "Include Usage",
               "type": "boolean"
            }
         },
         "required": [
            "include_usage"
         ],
         "title": "StreamOptions",
         "type": "object"
      }
   },
   "required": [
      "model"
   ]
}

字段:
字段 model: str [必需]#
字段 api_key: SecretStr | None = None#
字段 timeout: float | None = None#
字段 max_retries: int | None = None#
字段 model_capabilities: ModelCapabilities | None = None#
字段 model_info: ModelInfo | None = None#
字段 add_name_prefixes: bool | None = None#
字段 include_name_in_message: bool | None = None#
字段 default_headers: Dict[str, str] | None = None#
字段 frequency_penalty: float | None = None#
字段 logit_bias: Dict[str, int] | None = None#
字段 max_tokens: int | None = None#
字段 n: int | None = None#
字段 presence_penalty: float | None = None#
字段 response_format: ResponseFormat | None = None#
字段 seed: int | None = None#
字段 stop: str | List[str] | None = None#
字段 temperature: float | None = None#
字段 top_p: float | None = None#
字段 user: str | None = None#
字段 stream_options: StreamOptions | None = None#
字段 parallel_tool_calls: bool | None = None#
字段 reasoning_effort: Literal['minimal', 'low', 'medium', 'high'] | None = None#
pydantic 模型 OpenAIClientConfigurationConfigModel[源]#

基类:BaseOpenAIClientConfigurationConfigModel

显示 JSON 模式
{
   "title": "OpenAIClientConfigurationConfigModel",
   "type": "object",
   "properties": {
      "frequency_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Frequency Penalty"
      },
      "logit_bias": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "integer"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Logit Bias"
      },
      "max_tokens": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Tokens"
      },
      "n": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "N"
      },
      "presence_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Presence Penalty"
      },
      "response_format": {
         "anyOf": [
            {
               "$ref": "#/$defs/ResponseFormat"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "seed": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Seed"
      },
      "stop": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stop"
      },
      "temperature": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Temperature"
      },
      "top_p": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Top P"
      },
      "user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User"
      },
      "stream_options": {
         "anyOf": [
            {
               "$ref": "#/$defs/StreamOptions"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "parallel_tool_calls": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Parallel Tool Calls"
      },
      "reasoning_effort": {
         "anyOf": [
            {
               "enum": [
                  "minimal",
                  "low",
                  "medium",
                  "high"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Reasoning Effort"
      },
      "model": {
         "title": "Model",
         "type": "string"
      },
      "api_key": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Api Key"
      },
      "timeout": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Timeout"
      },
      "max_retries": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Retries"
      },
      "model_capabilities": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelCapabilities"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "model_info": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelInfo"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "add_name_prefixes": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Add Name Prefixes"
      },
      "include_name_in_message": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Include Name In Message"
      },
      "default_headers": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "string"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Default Headers"
      },
      "organization": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Organization"
      },
      "base_url": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Base Url"
      }
   },
   "$defs": {
      "JSONSchema": {
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "schema": {
               "title": "Schema",
               "type": "object"
            },
            "strict": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Strict"
            }
         },
         "required": [
            "name"
         ],
         "title": "JSONSchema",
         "type": "object"
      },
      "ModelCapabilities": {
         "deprecated": true,
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output"
         ],
         "title": "ModelCapabilities",
         "type": "object"
      },
      "ModelInfo": {
         "description": "ModelInfo is a dictionary that contains information about a model's properties.\nIt is expected to be used in the model_info property of a model client.\n\nWe are expecting this to grow over time as we add more features.",
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            },
            "family": {
               "anyOf": [
                  {
                     "enum": [
                        "gpt-5",
                        "gpt-41",
                        "gpt-45",
                        "gpt-4o",
                        "o1",
                        "o3",
                        "o4",
                        "gpt-4",
                        "gpt-35",
                        "r1",
                        "gemini-1.5-flash",
                        "gemini-1.5-pro",
                        "gemini-2.0-flash",
                        "gemini-2.5-pro",
                        "gemini-2.5-flash",
                        "claude-3-haiku",
                        "claude-3-sonnet",
                        "claude-3-opus",
                        "claude-3-5-haiku",
                        "claude-3-5-sonnet",
                        "claude-3-7-sonnet",
                        "claude-4-opus",
                        "claude-4-sonnet",
                        "llama-3.3-8b",
                        "llama-3.3-70b",
                        "llama-4-scout",
                        "llama-4-maverick",
                        "codestral",
                        "open-codestral-mamba",
                        "mistral",
                        "ministral",
                        "pixtral",
                        "unknown"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "string"
                  }
               ],
               "title": "Family"
            },
            "structured_output": {
               "title": "Structured Output",
               "type": "boolean"
            },
            "multiple_system_messages": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Multiple System Messages"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output",
            "family",
            "structured_output"
         ],
         "title": "ModelInfo",
         "type": "object"
      },
      "ResponseFormat": {
         "properties": {
            "type": {
               "enum": [
                  "text",
                  "json_object",
                  "json_schema"
               ],
               "title": "Type",
               "type": "string"
            },
            "json_schema": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JSONSchema"
                  },
                  {
                     "type": "null"
                  }
               ]
            }
         },
         "required": [
            "type",
            "json_schema"
         ],
         "title": "ResponseFormat",
         "type": "object"
      },
      "StreamOptions": {
         "properties": {
            "include_usage": {
               "title": "Include Usage",
               "type": "boolean"
            }
         },
         "required": [
            "include_usage"
         ],
         "title": "StreamOptions",
         "type": "object"
      }
   },
   "required": [
      "model"
   ]
}

字段:
字段 model: str [必需]#
字段 api_key: SecretStr | None = None#
字段 timeout: float | None = None#
字段 max_retries: int | None = None#
字段 model_capabilities: ModelCapabilities | None = None#
字段 model_info: ModelInfo | None = None#
字段 add_name_prefixes: bool | None = None#
字段 include_name_in_message: bool | None = None#
字段 default_headers: Dict[str, str] | None = None#
字段 frequency_penalty: float | None = None#
字段 logit_bias: Dict[str, int] | None = None#
字段 max_tokens: int | None = None#
字段 n: int | None = None#
字段 presence_penalty: float | None = None#
字段 response_format: ResponseFormat | None = None#
字段 seed: int | None = None#
字段 stop: str | List[str] | None = None#
字段 temperature: float | None = None#
字段 top_p: float | None = None#
字段 user: str | None = None#
字段 stream_options: StreamOptions | None = None#
字段 parallel_tool_calls: bool | None = None#
字段 reasoning_effort: Literal['minimal', 'low', 'medium', 'high'] | None = None#
字段 organization: str | None = None#
字段 base_url: str | None = None#
pydantic 模型 AzureOpenAIClientConfigurationConfigModel[源]#

基类:BaseOpenAIClientConfigurationConfigModel

显示 JSON 模式
{
   "title": "AzureOpenAIClientConfigurationConfigModel",
   "type": "object",
   "properties": {
      "frequency_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Frequency Penalty"
      },
      "logit_bias": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "integer"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Logit Bias"
      },
      "max_tokens": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Tokens"
      },
      "n": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "N"
      },
      "presence_penalty": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Presence Penalty"
      },
      "response_format": {
         "anyOf": [
            {
               "$ref": "#/$defs/ResponseFormat"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "seed": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Seed"
      },
      "stop": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stop"
      },
      "temperature": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Temperature"
      },
      "top_p": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Top P"
      },
      "user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User"
      },
      "stream_options": {
         "anyOf": [
            {
               "$ref": "#/$defs/StreamOptions"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "parallel_tool_calls": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Parallel Tool Calls"
      },
      "reasoning_effort": {
         "anyOf": [
            {
               "enum": [
                  "minimal",
                  "low",
                  "medium",
                  "high"
               ],
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Reasoning Effort"
      },
      "model": {
         "title": "Model",
         "type": "string"
      },
      "api_key": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Api Key"
      },
      "timeout": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Timeout"
      },
      "max_retries": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Max Retries"
      },
      "model_capabilities": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelCapabilities"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "model_info": {
         "anyOf": [
            {
               "$ref": "#/$defs/ModelInfo"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "add_name_prefixes": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Add Name Prefixes"
      },
      "include_name_in_message": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Include Name In Message"
      },
      "default_headers": {
         "anyOf": [
            {
               "additionalProperties": {
                  "type": "string"
               },
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Default Headers"
      },
      "azure_endpoint": {
         "title": "Azure Endpoint",
         "type": "string"
      },
      "azure_deployment": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Azure Deployment"
      },
      "api_version": {
         "title": "Api Version",
         "type": "string"
      },
      "azure_ad_token": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Azure Ad Token"
      },
      "azure_ad_token_provider": {
         "anyOf": [
            {
               "$ref": "#/$defs/ComponentModel"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "ComponentModel": {
         "description": "Model class for a component. Contains all information required to instantiate a component.",
         "properties": {
            "provider": {
               "title": "Provider",
               "type": "string"
            },
            "component_type": {
               "anyOf": [
                  {
                     "enum": [
                        "model",
                        "agent",
                        "tool",
                        "termination",
                        "token_provider",
                        "workbench"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Component Type"
            },
            "version": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Version"
            },
            "component_version": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Component Version"
            },
            "description": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Description"
            },
            "label": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Label"
            },
            "config": {
               "title": "Config",
               "type": "object"
            }
         },
         "required": [
            "provider",
            "config"
         ],
         "title": "ComponentModel",
         "type": "object"
      },
      "JSONSchema": {
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "type": "string"
            },
            "schema": {
               "title": "Schema",
               "type": "object"
            },
            "strict": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Strict"
            }
         },
         "required": [
            "name"
         ],
         "title": "JSONSchema",
         "type": "object"
      },
      "ModelCapabilities": {
         "deprecated": true,
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output"
         ],
         "title": "ModelCapabilities",
         "type": "object"
      },
      "ModelInfo": {
         "description": "ModelInfo is a dictionary that contains information about a model's properties.\nIt is expected to be used in the model_info property of a model client.\n\nWe are expecting this to grow over time as we add more features.",
         "properties": {
            "vision": {
               "title": "Vision",
               "type": "boolean"
            },
            "function_calling": {
               "title": "Function Calling",
               "type": "boolean"
            },
            "json_output": {
               "title": "Json Output",
               "type": "boolean"
            },
            "family": {
               "anyOf": [
                  {
                     "enum": [
                        "gpt-5",
                        "gpt-41",
                        "gpt-45",
                        "gpt-4o",
                        "o1",
                        "o3",
                        "o4",
                        "gpt-4",
                        "gpt-35",
                        "r1",
                        "gemini-1.5-flash",
                        "gemini-1.5-pro",
                        "gemini-2.0-flash",
                        "gemini-2.5-pro",
                        "gemini-2.5-flash",
                        "claude-3-haiku",
                        "claude-3-sonnet",
                        "claude-3-opus",
                        "claude-3-5-haiku",
                        "claude-3-5-sonnet",
                        "claude-3-7-sonnet",
                        "claude-4-opus",
                        "claude-4-sonnet",
                        "llama-3.3-8b",
                        "llama-3.3-70b",
                        "llama-4-scout",
                        "llama-4-maverick",
                        "codestral",
                        "open-codestral-mamba",
                        "mistral",
                        "ministral",
                        "pixtral",
                        "unknown"
                     ],
                     "type": "string"
                  },
                  {
                     "type": "string"
                  }
               ],
               "title": "Family"
            },
            "structured_output": {
               "title": "Structured Output",
               "type": "boolean"
            },
            "multiple_system_messages": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Multiple System Messages"
            }
         },
         "required": [
            "vision",
            "function_calling",
            "json_output",
            "family",
            "structured_output"
         ],
         "title": "ModelInfo",
         "type": "object"
      },
      "ResponseFormat": {
         "properties": {
            "type": {
               "enum": [
                  "text",
                  "json_object",
                  "json_schema"
               ],
               "title": "Type",
               "type": "string"
            },
            "json_schema": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JSONSchema"
                  },
                  {
                     "type": "null"
                  }
               ]
            }
         },
         "required": [
            "type",
            "json_schema"
         ],
         "title": "ResponseFormat",
         "type": "object"
      },
      "StreamOptions": {
         "properties": {
            "include_usage": {
               "title": "Include Usage",
               "type": "boolean"
            }
         },
         "required": [
            "include_usage"
         ],
         "title": "StreamOptions",
         "type": "object"
      }
   },
   "required": [
      "model",
      "azure_endpoint",
      "api_version"
   ]
}

字段:
字段 model: str [必需]#
字段 api_key: SecretStr | None = None#
字段 timeout: float | None = None#
字段 max_retries: int | None = None#
字段 model_capabilities: ModelCapabilities | None = None#
字段 model_info: ModelInfo | None = None#
字段 add_name_prefixes: bool | None = None#
字段 include_name_in_message: bool | None = None#
字段 default_headers: Dict[str, str] | None = None#
字段 frequency_penalty: float | None = None#
字段 logit_bias: Dict[str, int] | None = None#
字段 max_tokens: int | None = None#
字段 n: int | None = None#
字段 presence_penalty: float | None = None#
字段 response_format: ResponseFormat | None = None#
字段 seed: int | None = None#
字段 stop: str | List[str] | None = None#
字段 temperature: float | None = None#
字段 top_p: float | None = None#
字段 user: str | None = None#
字段 stream_options: StreamOptions | None = None#
字段 parallel_tool_calls: bool | None = None#
字段 reasoning_effort: Literal['minimal', 'low', 'medium', 'high'] | None = None#
字段 azure_endpoint: str [必需]#
字段 azure_deployment: str | None = None#
字段 api_version: str [必需]#
字段 azure_ad_token: str | None = None#
字段 azure_ad_token_provider: ComponentModel | None = None#