Vitrous commited on
Commit
529859b
·
verified ·
1 Parent(s): c8ba854

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -189,8 +189,9 @@ async def hermes_chat(request: Request):
189
  dict: The response generated by the model.
190
  """
191
  try:
192
- data = await request.body()
193
- msg_prompt = data.decode('utf-8')
 
194
 
195
  if not msg_prompt:
196
  raise HTTPException(status_code=400, detail="No prompt provided")
 
189
  dict: The response generated by the model.
190
  """
191
  try:
192
+
193
+ data = await request.json()
194
+ msg_prompt = data.get('msg_prompt')
195
 
196
  if not msg_prompt:
197
  raise HTTPException(status_code=400, detail="No prompt provided")