AzureChatPromptExecutionSettings Class
Specific settings for the Azure OpenAI Chat Completion endpoint.
Initialize the prompt execution settings.
- Inheritance
-
AzureChatPromptExecutionSettings
Constructor
AzureChatPromptExecutionSettings(service_id: str | None = None, *, extension_data: dict[str, Any] = None, function_choice_behavior: FunctionChoiceBehavior | None = None, ai_model_id: str | None = None, frequency_penalty: Annotated[float | None, Ge(ge=-2.0), Le(le=2.0)] = None, logit_bias: dict[str | int, float] | None = None, max_tokens: Annotated[int | None, Gt(gt=0)] = None, number_of_responses: Annotated[int | None, Ge(ge=1), Le(le=128)] = None, presence_penalty: Annotated[float | None, Ge(ge=-2.0), Le(le=2.0)] = None, seed: int | None = None, stop: str | list[str] | None = None, stream: bool = False, temperature: Annotated[float | None, Ge(ge=0.0), Le(le=2.0)] = None, top_p: Annotated[float | None, Ge(ge=0.0), Le(le=1.0)] = None, user: str | None = None, response_format: dict[Literal['type'], Literal['text', 'json_object']] | dict[str, Any] | type[BaseModel] | type | None = None, function_call: str | None = None, functions: list[dict[str, Any]] | None = None, messages: list[dict[str, Any]] | None = None, function_call_behavior: FunctionCallBehavior | None = None, tools: Annotated[list[dict[str, Any]] | None, MaxLen(max_length=64)] = None, tool_choice: str | None = None, structured_json_response: bool = False, stream_options: dict[str, Any] | None = None, extra_body: dict[str, Any] | ExtraBody | None = None)
Parameters
Name | Description |
---|---|
service_id
|
The service ID to use for the request. Default value: None
|
kwargs
Required
|
Additional keyword arguments, these are attempted to parse into the keys of the specific prompt execution settings. |
Keyword-Only Parameters
Name | Description |
---|---|
extension_data
Required
|
|
function_choice_behavior
Required
|
|
ai_model_id
Required
|
|
frequency_penalty
Required
|
|
logit_bias
Required
|
|
max_tokens
Required
|
|
number_of_responses
Required
|
|
presence_penalty
Required
|
|
seed
Required
|
|
stop
Required
|
|
stream
Required
|
|
temperature
Required
|
|
top_p
Required
|
|
user
Required
|
|
response_format
Required
|
|
function_call
Required
|
|
functions
Required
|
|
messages
Required
|
|
function_call_behavior
Required
|
|
tools
Required
|
|
tool_choice
Required
|
|
structured_json_response
Required
|
|
stream_options
Required
|
|
extra_body
Required
|
|
Attributes
model_computed_fields
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
model_config
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'populate_by_name': True, 'validate_assignment': True}
model_fields
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.fields from Pydantic V1.
model_fields: ClassVar[Dict[str, FieldInfo]] = {'ai_model_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=2, serialization_alias='model'), 'extension_data': FieldInfo(annotation=dict[str, Any], required=False, default_factory=dict), 'extra_body': FieldInfo(annotation=Union[dict[str, Any], ExtraBody, NoneType], required=False, default=None), 'frequency_penalty': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, metadata=[Ge(ge=-2.0), Le(le=2.0)]), 'function_call': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'function_call_behavior': FieldInfo(annotation=Union[FunctionCallBehavior, NoneType], required=False, default=None, exclude=True), 'function_choice_behavior': FieldInfo(annotation=Union[FunctionChoiceBehavior, NoneType], required=False, default=None, exclude=True), 'functions': FieldInfo(annotation=Union[list[dict[str, Any]], NoneType], required=False, default=None), 'logit_bias': FieldInfo(annotation=Union[dict[Union[str, int], float], NoneType], required=False, default=None), 'max_tokens': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, metadata=[Gt(gt=0)]), 'messages': FieldInfo(annotation=Union[list[dict[str, Any]], NoneType], required=False, default=None), 'number_of_responses': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, alias_priority=2, serialization_alias='n', metadata=[Ge(ge=1), Le(le=128)]), 'presence_penalty': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, metadata=[Ge(ge=-2.0), Le(le=2.0)]), 'response_format': FieldInfo(annotation=Union[dict[Literal['type'], Literal['text', 'json_object']], dict[str, Any], type[BaseModel], type, NoneType], required=False, default=None), 'seed': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'service_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, metadata=[MinLen(min_length=1)]), 'stop': FieldInfo(annotation=Union[str, list[str], NoneType], required=False, default=None), 'stream': FieldInfo(annotation=bool, required=False, default=False), 'stream_options': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False, default=None, description='Additional options to pass when streaming is used. Do not set this manually.'), 'structured_json_response': FieldInfo(annotation=bool, required=False, default=False, description='Do not set this manually. It is set by the service.'), 'temperature': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, metadata=[Ge(ge=0.0), Le(le=2.0)]), 'tool_choice': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Do not set this manually. It is set by the service based on the function choice configuration.'), 'tools': FieldInfo(annotation=Union[list[dict[str, Any]], NoneType], required=False, default=None, description='Do not set this manually. It is set by the service based on the function choice configuration.', metadata=[MaxLen(max_length=64)]), 'top_p': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, metadata=[Ge(ge=0.0), Le(le=1.0)]), 'user': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}
extra_body
extra_body: dict[str, Any] | ExtraBody | None