mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 13:55:41 +01:00
Merge branch 'main' of github.com:somashekhar161/private-gpt into feat/fireworks-integration
This commit is contained in:
commit
519c48b70b
9 changed files with 116 additions and 28 deletions
|
|
@ -157,6 +157,23 @@ class EmbeddingComponent:
|
|||
api_key=settings.gemini.api_key,
|
||||
model_name=settings.gemini.embedding_model,
|
||||
)
|
||||
case "mistralai":
|
||||
try:
|
||||
from llama_index.embeddings.mistralai import ( # type: ignore
|
||||
MistralAIEmbedding,
|
||||
)
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"Mistral dependencies not found, install with `poetry install --extras embeddings-mistral`"
|
||||
) from e
|
||||
|
||||
api_key = settings.openai.api_key
|
||||
model = settings.openai.embedding_model
|
||||
|
||||
self.embedding_model = MistralAIEmbedding(
|
||||
api_key=api_key,
|
||||
model=model,
|
||||
)
|
||||
case "mock":
|
||||
# Not a random number, is the dimensionality used by
|
||||
# the default embedding model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue