Update app.py
Browse files
app.py
CHANGED
@@ -25,6 +25,8 @@ CORS(app) # This will enable CORS for all routes
|
|
25 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
|
26 |
GROQ_API_URL = "https://api.together.xyz/v1/chat/completions"
|
27 |
APP_API_KEY = os.getenv("APP_API_KEY") # Set default if not in env
|
|
|
|
|
28 |
|
29 |
|
30 |
def check_api_key():
|
@@ -50,7 +52,7 @@ def create_chat_completion():
|
|
50 |
|
51 |
groq_payload = {
|
52 |
"messages": data["messages"],
|
53 |
-
"model":
|
54 |
"temperature": data.get("temperature", 0.1),
|
55 |
"n": data.get("n", 1),
|
56 |
}
|
@@ -99,7 +101,7 @@ def create_chat_completion():
|
|
99 |
"id": groq_response["id"],
|
100 |
"object": "chat.completion",
|
101 |
"created": groq_response["created"],
|
102 |
-
"model":
|
103 |
"choices": choices,
|
104 |
"usage": simplified_usage,
|
105 |
}
|
|
|
25 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
|
26 |
GROQ_API_URL = "https://api.together.xyz/v1/chat/completions"
|
27 |
APP_API_KEY = os.getenv("APP_API_KEY") # Set default if not in env
|
28 |
+
#MODEL = "deepseek-ai/DeepSeek-R1"
|
29 |
+
MODEL = "deepseek-ai/DeepSeek-R1-Distill-Llama-70B-free"
|
30 |
|
31 |
|
32 |
def check_api_key():
|
|
|
52 |
|
53 |
groq_payload = {
|
54 |
"messages": data["messages"],
|
55 |
+
"model": MODEL,
|
56 |
"temperature": data.get("temperature", 0.1),
|
57 |
"n": data.get("n", 1),
|
58 |
}
|
|
|
101 |
"id": groq_response["id"],
|
102 |
"object": "chat.completion",
|
103 |
"created": groq_response["created"],
|
104 |
+
"model": MODEL,
|
105 |
"choices": choices,
|
106 |
"usage": simplified_usage,
|
107 |
}
|