Embeddings
EndpointEmbeddings ¶
Bases: BaseEmbeddings
An Embeddings component that uses an OpenAI API compatible endpoint.
Attributes:
Name | Type | Description |
---|---|---|
endpoint_url |
str
|
The url of an OpenAI API compatible endpoint. |
Source code in libs/kotaemon/kotaemon/embeddings/endpoint_based.py
run ¶
Returns: list[DocumentWithEmbedding]: embeddings
Source code in libs/kotaemon/kotaemon/embeddings/endpoint_based.py
FastEmbedEmbeddings ¶
Bases: BaseEmbeddings
Utilize fastembed library for embeddings locally without GPU.
Supported model: https://qdrant.github.io/fastembed/examples/Supported_Models/ Code: https://github.com/qdrant/fastembed
Source code in libs/kotaemon/kotaemon/embeddings/fastembed.py
LCAzureOpenAIEmbeddings ¶
Bases: LCEmbeddingMixin
, BaseEmbeddings
Wrapper around Langchain's AzureOpenAI embedding, focusing on key parameters
Source code in libs/kotaemon/kotaemon/embeddings/langchain_based.py
LCCohereEmbeddings ¶
Bases: LCEmbeddingMixin
, BaseEmbeddings
Wrapper around Langchain's Cohere embedding, focusing on key parameters
Source code in libs/kotaemon/kotaemon/embeddings/langchain_based.py
LCHuggingFaceEmbeddings ¶
Bases: LCEmbeddingMixin
, BaseEmbeddings
Wrapper around Langchain's HuggingFace embedding, focusing on key parameters
Source code in libs/kotaemon/kotaemon/embeddings/langchain_based.py
LCOpenAIEmbeddings ¶
Bases: LCEmbeddingMixin
, BaseEmbeddings
Wrapper around Langchain's OpenAI embedding, focusing on key parameters
Source code in libs/kotaemon/kotaemon/embeddings/langchain_based.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
Source code in libs/kotaemon/kotaemon/embeddings/openai.py
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
TeiEndpointEmbeddings ¶
Bases: BaseEmbeddings
An Embeddings component that uses an TEI (Text-Embedding-Inference) API compatible endpoint.
Ref: https://github.com/huggingface/text-embeddings-inference
Attributes:
Name | Type | Description |
---|---|---|
endpoint_url |
str
|
The url of an TEI (Text-Embedding-Inference) API compatible endpoint. |
normalize |
bool
|
Whether to normalize embeddings to unit length. |
truncate |
bool
|
Whether to truncate embeddings to a fixed/default length. |