Update app.py
Browse files
app.py
CHANGED
|
@@ -309,8 +309,7 @@ def call_api(prompt: str, system_prompt: str = "You are a helpful assistant that
|
|
| 309 |
headers = {
|
| 310 |
'Authorization': f'Bearer {OPENROUTER_API_KEY}',
|
| 311 |
'Content-Type': 'application/json',
|
| 312 |
-
'HTTP-Referer': 'http://localhost:7860'
|
| 313 |
-
'X-Title': 'Overthinker'
|
| 314 |
}
|
| 315 |
data = {
|
| 316 |
'model': DEFAULT_MODEL,
|
|
@@ -325,7 +324,7 @@ def call_api(prompt: str, system_prompt: str = "You are a helpful assistant that
|
|
| 325 |
OPENROUTER_URL,
|
| 326 |
headers=headers,
|
| 327 |
json=data,
|
| 328 |
-
timeout=
|
| 329 |
)
|
| 330 |
if response.status_code == 200:
|
| 331 |
result = response.json()
|
|
|
|
| 309 |
headers = {
|
| 310 |
'Authorization': f'Bearer {OPENROUTER_API_KEY}',
|
| 311 |
'Content-Type': 'application/json',
|
| 312 |
+
'HTTP-Referer': 'http://localhost:7860'
|
|
|
|
| 313 |
}
|
| 314 |
data = {
|
| 315 |
'model': DEFAULT_MODEL,
|
|
|
|
| 324 |
OPENROUTER_URL,
|
| 325 |
headers=headers,
|
| 326 |
json=data,
|
| 327 |
+
timeout=60
|
| 328 |
)
|
| 329 |
if response.status_code == 200:
|
| 330 |
result = response.json()
|