rwitz commited on
Commit
4d15f04
·
1 Parent(s): 73006db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -32,7 +32,7 @@ def format_chatml_prompt(state):
32
  for message in state.value["history"]:
33
  chatml_prompt += f"<|im_start|> "+message['role']+"- "+ message['content']+"<|im_end|>\n"
34
  return chatml_prompt
35
- def get_bot_response(url, prompt):
36
  chatml_prompt = format_chatml_prompt(state)
37
  payload = {
38
  "input": {
@@ -59,8 +59,8 @@ def chat_with_bots(user_input, state):
59
  # Update the state with the names of the last bots
60
  state.update({'last_bots': [bot_names[0], bot_names[1]]})
61
 
62
- bot1_response = get_bot_response(bot1_url, user_input)
63
- bot2_response = get_bot_response(bot2_url, user_input)
64
 
65
  return bot1_response, bot2_response
66
 
 
32
  for message in state.value["history"]:
33
  chatml_prompt += f"<|im_start|> "+message['role']+"- "+ message['content']+"<|im_end|>\n"
34
  return chatml_prompt
35
+ def get_bot_response(url, prompt,state):
36
  chatml_prompt = format_chatml_prompt(state)
37
  payload = {
38
  "input": {
 
59
  # Update the state with the names of the last bots
60
  state.update({'last_bots': [bot_names[0], bot_names[1]]})
61
 
62
+ bot1_response = get_bot_response(bot1_url, user_input,state)
63
+ bot2_response = get_bot_response(bot2_url, user_input,state)
64
 
65
  return bot1_response, bot2_response
66