adriansanz commited on
Commit
69df6a7
·
verified ·
1 Parent(s): f290df8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -39,16 +39,22 @@ class GeminiLLM(LLM):
39
  "contents": [
40
  {
41
  "role": "system",
42
- "text": "You are an agent. Please respond concisely."
 
 
43
  },
44
  {
45
- "parts": [{"text": prompt}]
 
 
 
46
  }
47
  ],
48
  "generationConfig": {
49
  "temperature": self.temperature
50
  }
51
  }
 
52
  return requests.post(url, headers=headers, json=data)
53
 
54
  def _call(self, prompt: str, stop: Optional[List[str]] = None) -> str:
 
39
  "contents": [
40
  {
41
  "role": "system",
42
+ "content": {
43
+ "parts": ["You are an agent. Please respond concisely."]
44
+ }
45
  },
46
  {
47
+ "role": "user",
48
+ "content": {
49
+ "parts": [prompt]
50
+ }
51
  }
52
  ],
53
  "generationConfig": {
54
  "temperature": self.temperature
55
  }
56
  }
57
+
58
  return requests.post(url, headers=headers, json=data)
59
 
60
  def _call(self, prompt: str, stop: Optional[List[str]] = None) -> str: