mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
(feat) add mistral api embeddings
This commit is contained in:
parent
ab306ad5d4
commit
78f0c0228b
1 changed files with 14 additions and 0 deletions
|
@ -2342,6 +2342,20 @@ def embedding(
|
|||
model_response=EmbeddingResponse(),
|
||||
print_verbose=print_verbose,
|
||||
)
|
||||
elif custom_llm_provider == "mistral":
|
||||
api_key = api_key or litellm.api_key or get_secret("MISTRAL_API_KEY")
|
||||
response = openai_chat_completions.embedding(
|
||||
model=model,
|
||||
input=input,
|
||||
api_base=api_base,
|
||||
api_key=api_key,
|
||||
logging_obj=logging,
|
||||
timeout=timeout,
|
||||
model_response=EmbeddingResponse(),
|
||||
optional_params=optional_params,
|
||||
client=client,
|
||||
aembedding=aembedding,
|
||||
)
|
||||
else:
|
||||
args = locals()
|
||||
raise ValueError(f"No valid embedding model args passed in - {args}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue