Litellm ollama refactor (#7162)

* refactor(ollama/): refactor ollama `/api/generate` to use base llm config

Addresses https://github.com/andrewyng/aisuite/issues/113#issuecomment-2512369132

* test: skip unresponsive test

* test(test_secret_manager.py): mark flaky test

* test: fix google sm test

* fix: fix init.py
This commit is contained in:
Krish Dholakia 2024-12-10 21:45:35 -08:00 committed by GitHub
parent 488913c69f
commit 405080396d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 322 additions and 235 deletions

View file

@ -0,0 +1,12 @@
from typing import Union
import httpx
from litellm.llms.base_llm.transformation import BaseLLMException
class OllamaError(BaseLLMException):
def __init__(
self, status_code: int, message: str, headers: Union[dict, httpx.Headers]
):
super().__init__(status_code=status_code, message=message, headers=headers)