pyrit.embedding.AzureTextEmbedding#
- class AzureTextEmbedding(*, api_key: str = None, endpoint: str = None, deployment: str = None, api_version: str = '2024-02-01')[source]#
Bases:
_TextEmbedding
- __init__(*, api_key: str = None, endpoint: str = None, deployment: str = None, api_version: str = '2024-02-01') None [source]#
Generate embedding using the Azure API
- Parameters:
api_key – The API key to use. Defaults to environment variable.
endpoint – The API base to use, sometimes referred to as the api_base. Defaults to environment variable.
deployment – The engine to use, in AOAI referred to as deployment, in some APIs referred to as model. Defaults to environment variable.
api_version – The API version to use. Defaults to “2024-02-01”.
Methods
__init__
(*[, api_key, endpoint, deployment, ...])Generate embedding using the Azure API
generate_text_embedding
(text, **kwargs)Generate text embedding
Attributes