forked from phoenix/litellm-mirror
(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(),
|
model_response=EmbeddingResponse(),
|
||||||
print_verbose=print_verbose,
|
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:
|
else:
|
||||||
args = locals()
|
args = locals()
|
||||||
raise ValueError(f"No valid embedding model args passed in - {args}")
|
raise ValueError(f"No valid embedding model args passed in - {args}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue