BaseEmbeddings
This is the base module for all Embeddings model wrappers. Each specific Embedding class should extend this base class.
BaseEmbeddings
Bases: ABC
Base class for all Embeddings models. Each specific Embedding class should extend this class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model |
str
|
The model name used to generate the embeddings. |
required |
Source code in llmflows/llms/embeddings.py
generate(docs)
abstractmethod
Generates embeddings based on a VectorDoc or list of VectorDocs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_history |
A |
required |
Returns:
| Type | Description |
|---|---|
|
A string representing the generated text. |
Source code in llmflows/llms/embeddings.py
generate_async(docs)
abstractmethod
async
Generates embeddings asynchronously based on a VectorDoc or list of VectorDocs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message_history |
A |
required |
Returns:
| Type | Description |
|---|---|
|
A string representing the generated text. |