zelk12 commited on
Commit
7e7b73d
·
verified ·
1 Parent(s): 4138569

Update app.py

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