mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Litellm vllm refactor (#7158)
* refactor(vllm/): move vllm to use base llm config * test: mark flaky test
This commit is contained in:
parent
e9fbefca5d
commit
cd9b92b402
9 changed files with 48 additions and 8 deletions
|
@ -3541,7 +3541,21 @@ def get_optional_params( # noqa: PLR0915
|
|||
else False
|
||||
),
|
||||
)
|
||||
|
||||
elif custom_llm_provider == "vllm":
|
||||
supported_params = get_supported_openai_params(
|
||||
model=model, custom_llm_provider=custom_llm_provider
|
||||
)
|
||||
_check_valid_arg(supported_params=supported_params)
|
||||
optional_params = litellm.VLLMConfig().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 == "groq":
|
||||
supported_params = get_supported_openai_params(
|
||||
model=model, custom_llm_provider=custom_llm_provider
|
||||
|
@ -6319,6 +6333,8 @@ class ProviderConfigManager:
|
|||
return litellm.LMStudioChatConfig()
|
||||
elif litellm.LlmProviders.GALADRIEL == provider:
|
||||
return litellm.GaladrielChatConfig()
|
||||
elif litellm.LlmProviders.VLLM == provider:
|
||||
return litellm.VLLMConfig()
|
||||
elif litellm.LlmProviders.OLLAMA == provider:
|
||||
return litellm.OllamaConfig()
|
||||
return litellm.OpenAIGPTConfig()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue