VietCat commited on
Commit
00c1f95
·
1 Parent(s): 5e428da

add gemini

Browse files
Files changed (1) hide show
  1. app/llm.py +1 -1
app/llm.py CHANGED
@@ -209,7 +209,7 @@ class LLMClient:
209
  url = self.base_url
210
  headers = {"Content-Type": "application/json"}
211
  if self.api_key:
212
- headers["X-Goog-Api-Key"] = f"Bearer {self.api_key}"
213
  # Gemini API expects {"contents": [{"parts": [{"text": prompt}]}]}
214
  payload = {"contents": [{"parts": [{"text": prompt}]}]}
215
  response = await call_endpoint_with_retry(self._client, url, payload, headers=headers)
 
209
  url = self.base_url
210
  headers = {"Content-Type": "application/json"}
211
  if self.api_key:
212
+ headers["X-Goog-Api-Key"] = f"{self.api_key}"
213
  # Gemini API expects {"contents": [{"parts": [{"text": prompt}]}]}
214
  payload = {"contents": [{"parts": [{"text": prompt}]}]}
215
  response = await call_endpoint_with_retry(self._client, url, payload, headers=headers)