EinsteinCoder
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ CORS(app) # This will enable CORS for all routes
|
|
24 |
|
25 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
|
26 |
GROQ_API_URL = "https://api.groq.com/openai/v1/chat/completions"
|
27 |
-
APP_API_KEY = os.getenv("APP_API_KEY"
|
28 |
|
29 |
|
30 |
def check_api_key():
|
@@ -50,7 +50,7 @@ def create_chat_completion():
|
|
50 |
|
51 |
groq_payload = {
|
52 |
"messages": data["messages"],
|
53 |
-
"model": "
|
54 |
"max_tokens": data.get("max_tokens", 500),
|
55 |
"temperature": data.get("temperature", 1.0),
|
56 |
"n": data.get("n", 1),
|
|
|
24 |
|
25 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
|
26 |
GROQ_API_URL = "https://api.groq.com/openai/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 |
|
51 |
groq_payload = {
|
52 |
"messages": data["messages"],
|
53 |
+
"model": "llama-3.2-90b-vision-preview",
|
54 |
"max_tokens": data.get("max_tokens", 500),
|
55 |
"temperature": data.get("temperature", 1.0),
|
56 |
"n": data.get("n", 1),
|