Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -78,14 +78,14 @@ async def chat_with_gemini(input_data: ChatInput):
|
|
| 78 |
)
|
| 79 |
|
| 80 |
# 5. Call Gemini
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
|
| 90 |
response = requests.post(GEMINI_URL, headers=headers, json=payload)
|
| 91 |
result = response.json()
|
|
|
|
| 78 |
)
|
| 79 |
|
| 80 |
# 5. Call Gemini
|
| 81 |
+
headers = {"Content-Type": "application/json"}
|
| 82 |
+
payload = {
|
| 83 |
+
"contents": [
|
| 84 |
+
{
|
| 85 |
+
"parts": [{"text": enhanced_prompt}]
|
| 86 |
+
}
|
| 87 |
+
]
|
| 88 |
+
}
|
| 89 |
|
| 90 |
response = requests.post(GEMINI_URL, headers=headers, json=payload)
|
| 91 |
result = response.json()
|