moriire commited on
Commit
5b0eb6a
1 Parent(s): 96c0976

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -76,18 +76,20 @@ async def complete(
76
  seed=seed,
77
  stream=True
78
  )
 
79
  for chunk in output:
80
- """
81
  delta = chunk['choices'][0]['delta']
82
  if 'role' in delta:
83
  print(delta['role'], end=': ')
84
  elif 'content' in delta:
85
  print(delta['content'], end='')
86
- """
87
  print(chunk)
 
88
  et = time()
89
  output["time"] = et - st
90
- #return output
91
  except Exception as e:
92
  logger.error(f"Error in /complete endpoint: {e}")
93
  return JSONResponse(
 
76
  seed=seed,
77
  stream=True
78
  )
79
+ """
80
  for chunk in output:
81
+
82
  delta = chunk['choices'][0]['delta']
83
  if 'role' in delta:
84
  print(delta['role'], end=': ')
85
  elif 'content' in delta:
86
  print(delta['content'], end='')
87
+
88
  print(chunk)
89
+ """
90
  et = time()
91
  output["time"] = et - st
92
+ return output
93
  except Exception as e:
94
  logger.error(f"Error in /complete endpoint: {e}")
95
  return JSONResponse(