Openai
BaseOpenAIEmbeddings ¶
Bases: BaseEmbeddings
Base interface for OpenAI embedding model, using the openai library.
This class exposes the parameters in resources.Chat. To subclass this class:
1 2 3 |
|
Source code in libs\kotaemon\kotaemon\embeddings\openai.py
prepare_client ¶
Get the OpenAI client
Parameters:
Name | Type | Description | Default |
---|---|---|---|
async_version |
bool
|
Whether to get the async version of the client |
False
|
OpenAIEmbeddings ¶
Bases: BaseOpenAIEmbeddings
OpenAI chat model
Source code in libs\kotaemon\kotaemon\embeddings\openai.py
prepare_client ¶
Get the OpenAI client
Parameters:
Name | Type | Description | Default |
---|---|---|---|
async_version |
bool
|
Whether to get the async version of the client |
False
|
Source code in libs\kotaemon\kotaemon\embeddings\openai.py
openai_response ¶
Get the openai response
Source code in libs\kotaemon\kotaemon\embeddings\openai.py
AzureOpenAIEmbeddings ¶
Bases: BaseOpenAIEmbeddings
Source code in libs\kotaemon\kotaemon\embeddings\openai.py
prepare_client ¶
Get the OpenAI client
Parameters:
Name | Type | Description | Default |
---|---|---|---|
async_version |
bool
|
Whether to get the async version of the client |
False
|
Source code in libs\kotaemon\kotaemon\embeddings\openai.py
openai_response ¶
Get the openai response