feat(ui/model_dashboard.tsx): add databricks models via admin ui

This commit is contained in:
Krrish Dholakia 2024-05-23 20:28:54 -07:00
parent c14584722e
commit f04e4b921b
11 changed files with 263 additions and 9 deletions

View file

@ -34,7 +34,7 @@ from dataclasses import (
import litellm._service_logger # for storing API inputs, outputs, and metadata
from litellm.llms.custom_httpx.http_handler import HTTPHandler
from litellm.caching import DualCache
from litellm.types.utils import CostPerToken
from litellm.types.utils import CostPerToken, ProviderField
oidc_cache = DualCache()
@ -7327,6 +7327,15 @@ def load_test_model(
}
def get_provider_fields(custom_llm_provider: str) -> List[ProviderField]:
"""Return the fields required for each provider"""
if custom_llm_provider == "databricks":
return litellm.DatabricksConfig().get_required_params()
else:
return []
def validate_environment(model: Optional[str] = None) -> dict:
"""
Checks if the environment variables are valid for the given model.