pyrit.embedding.OpenAiTextEmbedding#
- class OpenAiTextEmbedding(*, model: str, api_key: str)[source]#
Bases:
_TextEmbedding
- __init__(*, model: str, api_key: str) None [source]#
Generate embedding using OpenAI API
- Parameters:
api_version – The API version to use
model – The model to use
api_key – The API key to use
Methods
__init__
(*, model, api_key)Generate embedding using OpenAI API
generate_text_embedding
(text, **kwargs)Generate text embedding