Skip to content

Commit

Permalink
Remove streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
adiazpinto committed Feb 4, 2025
1 parent 7ec3f0f commit 6c4b656
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions server-slicer/vila-m3-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,8 @@ async def chat_completions(
}
return JSONResponse(content=response)
else:
async def generate():
response_id = 'chatcmpl-' + os.urandom(12).hex()

yield f'data: {json.dumps({"id": response_id, "content": response_message})}\n\n'
yield 'data: [DONE]\n\n'

return StreamingResponse(generate(), media_type='text/event-stream')
print(f"Error: Streaming not implemented ...")
return HTTPException(status_code=500, detail="Error: Streaming not implemented ...")

except Exception as e:
print(f"Error: {e}")
Expand Down

0 comments on commit 6c4b656

Please sign in to comment.