Spaces:
Sleeping
Sleeping
Upload 5 files
Browse files- providers.py +8 -7
providers.py
CHANGED
|
@@ -31,10 +31,9 @@ class GroqProvider(LLMProvider):
|
|
| 31 |
BASE_URL = "https://api.groq.com/openai/v1"
|
| 32 |
|
| 33 |
MODELS = [
|
|
|
|
|
|
|
| 34 |
{"id": "llama-3.3-70b-versatile", "name": "Llama 3.3 70B", "context": 128000},
|
| 35 |
-
{"id": "llama-3.1-8b-instant", "name": "Llama 3.1 8B (Fast)", "context": 128000},
|
| 36 |
-
{"id": "mixtral-8x7b-32768", "name": "Mixtral 8x7B", "context": 32768},
|
| 37 |
-
{"id": "gemma2-9b-it", "name": "Gemma 2 9B", "context": 8192},
|
| 38 |
]
|
| 39 |
|
| 40 |
def chat(self, messages: List[Dict], model: str, tools: Optional[List] = None) -> Dict:
|
|
@@ -73,8 +72,10 @@ class CerebrasProvider(LLMProvider):
|
|
| 73 |
BASE_URL = "https://api.cerebras.ai/v1"
|
| 74 |
|
| 75 |
MODELS = [
|
|
|
|
|
|
|
|
|
|
| 76 |
{"id": "llama3.1-70b", "name": "Llama 3.1 70B", "context": 128000},
|
| 77 |
-
{"id": "llama3.1-8b", "name": "Llama 3.1 8B (Ultra Fast)", "context": 128000},
|
| 78 |
]
|
| 79 |
|
| 80 |
def chat(self, messages: List[Dict], model: str, tools: Optional[List] = None) -> Dict:
|
|
@@ -114,11 +115,11 @@ class OpenRouterProvider(LLMProvider):
|
|
| 114 |
BASE_URL = "https://openrouter.ai/api/v1"
|
| 115 |
|
| 116 |
MODELS = [
|
|
|
|
|
|
|
|
|
|
| 117 |
{"id": "anthropic/claude-3.5-sonnet", "name": "Claude 3.5 Sonnet", "context": 200000},
|
| 118 |
{"id": "google/gemini-2.0-flash-exp:free", "name": "Gemini 2.0 Flash (Free)", "context": 1000000},
|
| 119 |
-
{"id": "meta-llama/llama-3.3-70b-instruct", "name": "Llama 3.3 70B", "context": 128000},
|
| 120 |
-
{"id": "deepseek/deepseek-chat", "name": "DeepSeek V3", "context": 64000},
|
| 121 |
-
{"id": "qwen/qwen-2.5-coder-32b-instruct", "name": "Qwen 2.5 Coder 32B", "context": 32000},
|
| 122 |
]
|
| 123 |
|
| 124 |
def chat(self, messages: List[Dict], model: str, tools: Optional[List] = None) -> Dict:
|
|
|
|
| 31 |
BASE_URL = "https://api.groq.com/openai/v1"
|
| 32 |
|
| 33 |
MODELS = [
|
| 34 |
+
{"id": "moonshotai/kimi-k2-instruct-0905", "name": "Kimi K2 Instruct", "context": 128000},
|
| 35 |
+
{"id": "meta-llama/llama-4-maverick-17b-128e-instruct", "name": "Llama 4 Maverick 17B", "context": 128000},
|
| 36 |
{"id": "llama-3.3-70b-versatile", "name": "Llama 3.3 70B", "context": 128000},
|
|
|
|
|
|
|
|
|
|
| 37 |
]
|
| 38 |
|
| 39 |
def chat(self, messages: List[Dict], model: str, tools: Optional[List] = None) -> Dict:
|
|
|
|
| 72 |
BASE_URL = "https://api.cerebras.ai/v1"
|
| 73 |
|
| 74 |
MODELS = [
|
| 75 |
+
{"id": "gpt-oss-120b", "name": "GPT OSS 120B", "context": 128000},
|
| 76 |
+
{"id": "qwen-3-235b-a22b-instruct-2507", "name": "Qwen 3 235B", "context": 128000},
|
| 77 |
+
{"id": "zai-glm-4.6", "name": "GLM 4.6", "context": 128000},
|
| 78 |
{"id": "llama3.1-70b", "name": "Llama 3.1 70B", "context": 128000},
|
|
|
|
| 79 |
]
|
| 80 |
|
| 81 |
def chat(self, messages: List[Dict], model: str, tools: Optional[List] = None) -> Dict:
|
|
|
|
| 115 |
BASE_URL = "https://openrouter.ai/api/v1"
|
| 116 |
|
| 117 |
MODELS = [
|
| 118 |
+
{"id": "xiaomi/mimo-v2-flash:free", "name": "Xiaomi Mimo V2 Flash", "context": 128000},
|
| 119 |
+
{"id": "nex-agi/deepseek-v3.1-nex-n1:free", "name": "DeepSeek V3.1 Nex", "context": 128000},
|
| 120 |
+
{"id": "qwen/qwen3-coder:free", "name": "Qwen 3 Coder", "context": 128000},
|
| 121 |
{"id": "anthropic/claude-3.5-sonnet", "name": "Claude 3.5 Sonnet", "context": 200000},
|
| 122 |
{"id": "google/gemini-2.0-flash-exp:free", "name": "Gemini 2.0 Flash (Free)", "context": 1000000},
|
|
|
|
|
|
|
|
|
|
| 123 |
]
|
| 124 |
|
| 125 |
def chat(self, messages: List[Dict], model: str, tools: Optional[List] = None) -> Dict:
|