mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
LiteLLM Common Base LLM Config (pt.4): Move Ollama to Base LLM Config (#7157)
* 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
This commit is contained in:
parent
3b5485a14e
commit
40a22eb4c6
11 changed files with 322 additions and 234 deletions
|
@ -3308,6 +3308,12 @@ def get_optional_params( # noqa: PLR0915
|
|||
optional_params = litellm.OllamaConfig().map_openai_params(
|
||||
non_default_params=non_default_params,
|
||||
optional_params=optional_params,
|
||||
model=model,
|
||||
drop_params=(
|
||||
drop_params
|
||||
if drop_params is not None and isinstance(drop_params, bool)
|
||||
else False
|
||||
),
|
||||
)
|
||||
elif custom_llm_provider == "ollama_chat":
|
||||
supported_params = get_supported_openai_params(
|
||||
|
@ -6313,6 +6319,8 @@ class ProviderConfigManager:
|
|||
return litellm.LMStudioChatConfig()
|
||||
elif litellm.LlmProviders.GALADRIEL == provider:
|
||||
return litellm.GaladrielChatConfig()
|
||||
elif litellm.LlmProviders.OLLAMA == provider:
|
||||
return litellm.OllamaConfig()
|
||||
return litellm.OpenAIGPTConfig()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue