Update app.py
Browse files
app.py
CHANGED
|
@@ -50,13 +50,13 @@ def ask_openrouter(
|
|
| 50 |
if not prompt.strip():
|
| 51 |
raise gr.Error("Please enter a prompt.")
|
| 52 |
|
| 53 |
-
url = "https://openrouter.ai"
|
| 54 |
|
| 55 |
headers = {
|
| 56 |
"Authorization": f"Bearer {key}",
|
| 57 |
"Content-Type": "application/json",
|
| 58 |
-
"HTTP-Referer": "https://your-app-url.com",
|
| 59 |
-
"X-OpenRouter-Title": "Gradio OpenRouter App",
|
| 60 |
}
|
| 61 |
|
| 62 |
messages = []
|
|
|
|
| 50 |
if not prompt.strip():
|
| 51 |
raise gr.Error("Please enter a prompt.")
|
| 52 |
|
| 53 |
+
url = "https://openrouter.ai/api/v1/chat/completions"
|
| 54 |
|
| 55 |
headers = {
|
| 56 |
"Authorization": f"Bearer {key}",
|
| 57 |
"Content-Type": "application/json",
|
| 58 |
+
#"HTTP-Referer": "https://your-app-url.com",
|
| 59 |
+
#"X-OpenRouter-Title": "Gradio OpenRouter App",
|
| 60 |
}
|
| 61 |
|
| 62 |
messages = []
|