multiple_users

This commit is contained in:
ahmed531998 2023-04-17 06:25:58 +02:00
parent e52091f206
commit 346cb31afd
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,7 @@ def init_dm():
user = User(username, token)
users[username] = user
threading.Thread(target=user_interest_decay, name='decayinterest_'+username).start()
message = {"assignedname": "your assigned name is " + username}
message = {"answer": "your assigned name is " + username, "assignedname": username}
return message
@app.route("/api/predict", methods=['POST'])
@ -120,6 +120,8 @@ def predict():
new_state = {'modified_query': response, 'intent': state['intent']}
dm.update(new_state)
reply = jsonify(message)
dms[username] = dm
users[username] = user
return reply
@app.route('/api/feedback', methods = ['POST'])