zelk12 commited on
Commit
571005e
·
verified ·
1 Parent(s): 12bb267

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,12 +57,12 @@ def model_response(message, history):
57
  if message_to_check.get("role") == "user" :
58
  gemini_history.append({
59
  "role": "user",
60
- "parts": [message_to_check.get("content", "")]
61
  })
62
  elif message_to_check.get("role") == "assistant" :
63
  gemini_history.append({
64
  "role": "model",
65
- "parts": [message_to_check.get("content", "")]
66
  })
67
 
68
  print(f"his: {gemini_history}")
 
57
  if message_to_check.get("role") == "user" :
58
  gemini_history.append({
59
  "role": "user",
60
+ "parts": [{"text": message_to_check.get("content", "")}]
61
  })
62
  elif message_to_check.get("role") == "assistant" :
63
  gemini_history.append({
64
  "role": "model",
65
+ "parts": [{"text": message_to_check.get("content", "")}]
66
  })
67
 
68
  print(f"his: {gemini_history}")