ChenyuRabbitLove commited on
Commit
94e7b46
1 Parent(s): 656a64f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -61,8 +61,8 @@ def respond(
61
  message,
62
  history: list[tuple[str, str]],
63
  ):
64
- messages = [{"role": "system", "content": ['type': 'text', 'text': '']}]
65
- messages.append({"role": "user", "content": ['type': 'text', 'text': message]})
66
 
67
  response = chat_completion_request(messages, tools=tools, tool_choice='auto')
68
 
@@ -90,9 +90,9 @@ def respond(
90
  }
91
  )
92
  second_response = chat_completion_request(messages)
93
- messages.append({"role": "assistant", "content": ['type': 'text', 'text': second_response.choices[0].message.content]})
94
  return messages
95
- messages.append({"role": "assistant", "content": ['type': 'text', 'text': response.choices[0].message.content]})
96
  return messages
97
 
98
  """
 
61
  message,
62
  history: list[tuple[str, str]],
63
  ):
64
+ messages = [{"role": "system", "content": [{'type': 'text', 'text': ''}]}]
65
+ messages.append({"role": "user", "content": [{'type': 'text', 'text': message}]})
66
 
67
  response = chat_completion_request(messages, tools=tools, tool_choice='auto')
68
 
 
90
  }
91
  )
92
  second_response = chat_completion_request(messages)
93
+ messages.append({"role": "assistant", "content": [{'type': 'text', 'text': second_response.choices[0].message.content}]})
94
  return messages
95
+ messages.append({"role": "assistant", "content": [{'type': 'text', 'text': response.choices[0].message.content}]})
96
  return messages
97
 
98
  """