diamond-in commited on
Commit
5d9723c
·
verified ·
1 Parent(s): 7cf45da

Update chat/gemini.py

Browse files
Files changed (1) hide show
  1. 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-pro:generateContent?key={GEMINI_API_KEY}"
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 = []