Commit 60d6f823 authored by Your Name's avatar Your Name

Fix TypeError: async_generator can't be used in 'await' expression

- Removed incorrect 'await' on generate_stream which returns an async generator
parent 367c92dc
......@@ -2251,7 +2251,7 @@ async def chat_completions(request: ChatCompletionRequest, http_request: Request
# Use the backend's async generate if available
if hasattr(current_manager.backend, 'generate_stream'):
async for chunk in await current_manager.backend.generate_stream(
async for chunk in current_manager.backend.generate_stream(
prompt=raw_prompt_for_generation,
max_tokens=request.max_tokens or 2048,
temperature=request.temperature,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment