mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix: strip ollama/ prefix from model name in embedding requests
This commit is contained in:
parent
d949085310
commit
039b747318
1 changed files with 2 additions and 0 deletions
|
|
@ -13,6 +13,8 @@ from litellm.types.utils import EmbeddingResponse
|
|||
def _prepare_ollama_embedding_payload(
|
||||
model: str, prompts: List[str], optional_params: Dict[str, Any]
|
||||
) -> Dict[str, Any]:
|
||||
if model.startswith("ollama/"):
|
||||
model = model[len("ollama/"):]
|
||||
data: Dict[str, Any] = {"model": model, "input": prompts}
|
||||
special_optional_params = ["truncate", "options", "keep_alive", "dimensions"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue