feat: add claude template

This commit is contained in:
Rt39
2025-02-20 23:58:10 -05:00
parent bf2c3a1a81
commit 48ae686602
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -420,6 +420,18 @@ CONFIG_METADATA_2 = {
"model": "grok-2-latest",
},
},
"claude": {
"id": "claude",
"type": "anthropic_chat_completion",
"enable": True,
"key": [],
"api_base": "https://api.anthropic.com/v1",
"timeout": 120,
"model_config": {
"model": "claude-3-5-sonnet-latest",
"max_tokens": 4096,
},
},
"ollama": {
"id": "ollama_default",
"type": "openai_chat_completion",
@@ -25,7 +25,7 @@ class ProviderAnthropic(ProviderOpenAIOfficial):
) -> None:
# Skip OpenAI's __init__ and call Provider's __init__ directly
Provider.__init__(self, provider_config, provider_settings, persistant_history, db_helper, default_persona)
self.chosen_api_key = None
self.api_keys: List = provider_config.get("key", [])
self.chosen_api_key = self.api_keys[0] if len(self.api_keys) > 0 else None