updated oobabooga to new api and support for embeddings

This commit is contained in:
dan 2023-12-26 19:45:28 -05:00
parent 31fbb095c2
commit c4dfd9be7c
2 changed files with 86 additions and 59 deletions

View file

@ -2313,6 +2313,16 @@ def embedding(
optional_params=optional_params,
model_response=EmbeddingResponse(),
)
elif custom_llm_provider == "oobabooga":
response = oobabooga.embedding(
model=model,
input=input,
encoding=encoding,
api_base=api_base,
logging_obj=logging,
optional_params=optional_params,
model_response= EmbeddingResponse()
)
elif custom_llm_provider == "ollama":
if aembedding == True:
response = ollama.ollama_aembeddings(