moriire commited on
Commit
a5fcdf4
1 Parent(s): eee4dd7

Update app/llm.py

Browse files
Files changed (1) hide show
  1. app/llm.py +3 -1
app/llm.py CHANGED
@@ -116,7 +116,8 @@ async def generate(gen:GenModel):#, user: schemas.BaseUser = fastapi.Depends(cur
116
  stream=True,
117
  echo = True
118
  )
119
-
 
120
  for chunk in output:
121
  delta = chunk['choices'][0]#['delta']
122
  print(delta)
@@ -129,6 +130,7 @@ async def generate(gen:GenModel):#, user: schemas.BaseUser = fastapi.Depends(cur
129
  #et = time()
130
  #output["time"] = et - st
131
  #print(output)
 
132
  except Exception as e:
133
  logger.error(f"Error in /generate endpoint: {e}")
134
  return JSONResponse(
 
116
  stream=True,
117
  echo = True
118
  )
119
+ return output
120
+ """
121
  for chunk in output:
122
  delta = chunk['choices'][0]#['delta']
123
  print(delta)
 
130
  #et = time()
131
  #output["time"] = et - st
132
  #print(output)
133
+ """
134
  except Exception as e:
135
  logger.error(f"Error in /generate endpoint: {e}")
136
  return JSONResponse(