jonathanjordan21 commited on
Commit
375567d
·
verified ·
1 Parent(s): 63e4b77

Update apis/chat_api.py

Browse files
Files changed (1) hide show
  1. apis/chat_api.py +2 -2
apis/chat_api.py CHANGED
@@ -220,8 +220,8 @@ class ChatAPIApp:
220
  data_response = {
221
  "model": data_response.get('model'),
222
  "created_at": data_response.get('created_at'),
223
- "response": "The sky is blue because it is the color of the sky.",
224
- "done": True if data_response.get('choices')[0].get('finish_reason') != null else False,
225
  }
226
  return data_response
227
  except HfApiException as e:
 
220
  data_response = {
221
  "model": data_response.get('model'),
222
  "created_at": data_response.get('created_at'),
223
+ "response": data_response.get('choices')[-1].get('message').get('content'),
224
+ "done": True if data_response.get('choices')[-1].get('finish_reason') != null else False,
225
  }
226
  return data_response
227
  except HfApiException as e: