OpenAIEmbeddingPromptExecutionSettings Class

Specific settings for the text embedding endpoint.

Initialize the prompt execution settings.

Inheritance
OpenAIEmbeddingPromptExecutionSettings

Constructor

OpenAIEmbeddingPromptExecutionSettings(service_id: str | None = None, *, extension_data: dict[str, Any] = None, function_choice_behavior: FunctionChoiceBehavior | None = None, input: str | list[str] | list[int] | list[list[int]] | None = None, ai_model_id: str | None = None, encoding_format: Literal['float', 'base64'] | None = None, user: str | None = None, extra_headers: dict | None = None, extra_query: dict | None = None, extra_body: dict | None = None, timeout: float | None = None, dimensions: Annotated[int | None, Gt(gt=0), Le(le=3072)] = None)

Parameters

Name Description
service_id
str

The service ID to use for the request.

Default value: None
kwargs
Required
Any

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
input
Required
ai_model_id
Required
encoding_format
Required
user
Required
extra_headers
Required
extra_query
Required
extra_body
Required
timeout
Required
dimensions
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'), 'dimensions': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, metadata=[Gt(gt=0), Le(le=3072)]), 'encoding_format': FieldInfo(annotation=Union[Literal['float', 'base64'], NoneType], required=False, default=None), 'extension_data': FieldInfo(annotation=dict[str, Any], required=False, default_factory=dict), 'extra_body': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None), 'extra_headers': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None), 'extra_query': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None), 'function_choice_behavior': FieldInfo(annotation=Union[FunctionChoiceBehavior, NoneType], required=False, default=None, exclude=True), 'input': FieldInfo(annotation=Union[str, list[str], list[int], list[list[int]], NoneType], required=False, default=None), 'service_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, metadata=[MinLen(min_length=1)]), 'timeout': FieldInfo(annotation=Union[float, NoneType], required=False, default=None), 'user': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}

ai_model_id

ai_model_id: str | None

dimensions

dimensions: int | None

encoding_format

encoding_format: Literal['float', 'base64'] | None

extra_body

extra_body: dict | None

extra_headers

extra_headers: dict | None

extra_query

extra_query: dict | None

input

input: str | list[str] | list[int] | list[list[int]] | None

timeout

timeout: float | None

user

user: str | None