Add support of xAI and their Grok-2 model

Close #1630
This commit is contained in:
Peter Dave Hello
2025-04-08 01:36:21 +08:00
parent a919c62606
commit 665fb90a98
4 changed files with 22 additions and 0 deletions

View File

@ -67,6 +67,8 @@ class LiteLLMAIHandler(BaseAiHandler):
litellm.api_key = get_settings().groq.key
if get_settings().get("REPLICATE.KEY", None):
litellm.replicate_key = get_settings().replicate.key
if get_settings().get("XAI.KEY", None):
litellm.api_key = get_settings().xai.key
if get_settings().get("HUGGINGFACE.KEY", None):
litellm.huggingface_key = get_settings().huggingface.key
if get_settings().get("HUGGINGFACE.API_BASE", None) and 'huggingface' in get_settings().config.model: