Francesco commited on
Commit
cb02041
1 Parent(s): 4b1e309

updated README

Browse files
Files changed (1) hide show
  1. main.py +3 -4
main.py CHANGED
@@ -75,7 +75,7 @@ def message_handler(
75
 
76
  logging.info("asking question to GPT")
77
  # let's add the messages to our stuff
78
- messages.append(HumanMessage(content=message))
79
  chatbot_messages.append((message, ""))
80
  # this is a little wrapper we need cuz we have to add the job_done
81
  def task():
@@ -145,9 +145,8 @@ def on_drop_down_change(selected_item, messages):
145
  def on_demo_load(url_params):
146
  username = url_params.get("username", "test")
147
  logging.info(f"Getting user for username={username}")
148
- # create_user(client, User(username=username, uid=None))
149
- # user = get_user_by_username(client, username)
150
- user = User(username=username, uid=1)
151
  logging.info(f"User {user}")
152
  print(f"got url_params: {url_params}")
153
  return user, f"Nice to see you {user['username']} 👋"
 
75
 
76
  logging.info("asking question to GPT")
77
  # let's add the messages to our stuff
78
+ messages.append(HumanMessage(content=f"Doctor:{message}"))
79
  chatbot_messages.append((message, ""))
80
  # this is a little wrapper we need cuz we have to add the job_done
81
  def task():
 
145
  def on_demo_load(url_params):
146
  username = url_params.get("username", "test")
147
  logging.info(f"Getting user for username={username}")
148
+ create_user(client, User(username=username, uid=None))
149
+ user = get_user_by_username(client, username)
 
150
  logging.info(f"User {user}")
151
  print(f"got url_params: {url_params}")
152
  return user, f"Nice to see you {user['username']} 👋"