vlff李飞飞 commited on
Commit
6bcbc6d
1 Parent(s): af1bfb7

update oai

Browse files
Files changed (1) hide show
  1. qwen_agent/llm/qwen_oai.py +2 -1
qwen_agent/llm/qwen_oai.py CHANGED
@@ -326,7 +326,8 @@ def create_chat_completion(request: ChatCompletionRequest):
326
  if request.functions:
327
  raise Exception("Invalid request: Function calling is not yet implemented for stream mode.")
328
  generate = predict(query, history, request.model, stop_words, gen_kwargs)
329
- return EventSourceResponse(generate, media_type="text/event-stream")
 
330
 
331
  stop_words_ids = [tokenizer.encode(s) for s in stop_words] if stop_words else None
332
  if query is _TEXT_COMPLETION_CMD:
 
326
  if request.functions:
327
  raise Exception("Invalid request: Function calling is not yet implemented for stream mode.")
328
  generate = predict(query, history, request.model, stop_words, gen_kwargs)
329
+ return generate
330
+ # return EventSourceResponse(generate, media_type="text/event-stream")
331
 
332
  stop_words_ids = [tokenizer.encode(s) for s in stop_words] if stop_words else None
333
  if query is _TEXT_COMPLETION_CMD: