Spaces:
Paused
Paused
Update chat/gemini.py
Browse files- chat/gemini.py +2 -2
chat/gemini.py
CHANGED
|
@@ -16,8 +16,8 @@ def chat_with_gemini(message: str, history: List[List[str]]) -> Tuple[str, List[
|
|
| 16 |
return "Please set your GEMINI_API_KEY in the Hugging Face secrets settings.", history
|
| 17 |
|
| 18 |
try:
|
| 19 |
-
# Gemini API endpoint
|
| 20 |
-
url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-
|
| 21 |
|
| 22 |
# Build conversation history
|
| 23 |
contents = []
|
|
|
|
| 16 |
return "Please set your GEMINI_API_KEY in the Hugging Face secrets settings.", history
|
| 17 |
|
| 18 |
try:
|
| 19 |
+
# Gemini API endpoint - Updated to use gemini-1.5-flash
|
| 20 |
+
url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key={GEMINI_API_KEY}"
|
| 21 |
|
| 22 |
# Build conversation history
|
| 23 |
contents = []
|