open_ai Package

Packages

exceptions
prompt_execution_settings
services
settings

Modules

const

Classes

ApiKeyAuthentication

API key authentication.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

AzureAISearchDataSource

Azure AI Search data source.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

AzureAISearchDataSourceParameters

Azure AI Search data source parameters.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

AzureChatCompletion

Azure Chat completion class.

Initialize an AzureChatCompletion service.

AzureChatPromptExecutionSettings

Specific settings for the Azure OpenAI Chat Completion endpoint.

Initialize the prompt execution settings.

AzureCosmosDBDataSource

Azure Cosmos DB data source.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

AzureCosmosDBDataSourceParameters

Azure Cosmos DB data source parameters.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

AzureDataSourceParameters

Azure data source parameters.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

AzureEmbeddingDependency

Azure embedding dependency.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

AzureTextCompletion

Azure Text Completion class.

Initialize an AzureTextCompletion service.

AzureTextEmbedding

Azure Text Embedding class.

Note: This class is experimental and may change in the future.

Initialize an AzureTextEmbedding service.

service_id: The service ID. (Optional) api_key {str | None}: The optional api key. If provided, will override the value in the

env vars or .env file.

deployment_name {str | None}: The optional deployment. If provided, will override the value (text_deployment_name) in the env vars or .env file.

endpoint {str | None}: The optional deployment endpoint. If provided will override the value in the env vars or .env file.

base_url {str | None}: The optional deployment base_url. If provided will override the value in the env vars or .env file.

api_version {str | None}: The optional deployment api version. If provided will override the value in the env vars or .env file.

ad_token {str | None}: The Azure AD token for authentication. (Optional) ad_auth {AsyncAzureADTokenProvider | None}: Whether to use Azure Active Directory authentication.

(Optional) The default value is False.

default_headers: The default headers mapping of string keys to string values for HTTP requests. (Optional)

async_client (Optional[AsyncAzureOpenAI]): An existing client to use. (Optional) env_file_path (str | None): Use the environment settings file as a fallback to

environment variables. (Optional)

AzureTextToImage

Azure Text to Image service.

Initialize an AzureTextToImage service.

ConnectionStringAuthentication

Connection string authentication.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

DataSourceFieldsMapping

Data source fields mapping.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

ExtraBody

Extra body for the Azure Chat Completion endpoint.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

OpenAIChatCompletion

OpenAI Chat completion class.

OpenAIChatPromptExecutionSettings

Specific settings for the Chat Completion endpoint.

Initialize the prompt execution settings.

OpenAIEmbeddingPromptExecutionSettings

Specific settings for the text embedding endpoint.

Initialize the prompt execution settings.

OpenAIPromptExecutionSettings

Common request settings for (Azure) OpenAI services.

Initialize the prompt execution settings.

OpenAITextCompletion

OpenAI Text Completion class.

Initialize an OpenAITextCompletion service.

OpenAITextEmbedding

OpenAI Text Embedding class.

Note: This class is experimental and may change in the future.

Initializes a new instance of the OpenAITextCompletion class.

OpenAITextPromptExecutionSettings

Specific settings for the completions endpoint.

Initialize the prompt execution settings.

OpenAITextToImage

OpenAI Text to Image service.

Initializes a new instance of the OpenAITextCompletion class.