bhuvanmdev commited on
Commit
d09b9c1
·
verified ·
1 Parent(s): baddd94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -167,13 +167,13 @@ Context:
167
  ]
168
 
169
  response_text = ""
170
- for chunk in self.llm.chat.completions.create(
171
  model=model_name,
172
  messages=messages,
173
  max_tokens=500,
174
  # stream=True
175
- ):
176
- return stream.choices[0].message.content
177
  # if hasattr(chunk.choices[0].delta, 'content'):
178
  # content = chunk.choices[0].delta.content
179
  # if content is not None:
 
167
  ]
168
 
169
  response_text = ""
170
+ return self.llm.chat.completions.create(
171
  model=model_name,
172
  messages=messages,
173
  max_tokens=500,
174
  # stream=True
175
+ ).choices[0].message.content
176
+ # return stream.choices[0].message.content
177
  # if hasattr(chunk.choices[0].delta, 'content'):
178
  # content = chunk.choices[0].delta.content
179
  # if content is not None: