How should I use stream_output_via_api.py in examples folder correctly?
powershell:
(base) PS F:\MetaGPT> conda activate metagpt (metagpt) PS F:\MetaGPT> python F:\MetaGPT\examples\stream_output_via_api.py 2024-06-16 10:45:20.617 | INFO | metagpt.const:get_metagpt_package_root:29 - Package root set to F:\MetaGPT
- Serving Flask app 'stream_output_via_api'
- Debug mode: off WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
- Running on http://10.81.212.82:7860 Press CTRL+C to quit
http://10.81.212.82:7860
Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
Should I change settings in stream_pipe.py? Looking forward to your replay.
This is a stream output example. The only accessable url is /v1/chat/completions.
curl -X POST http://10.81.212.82:7860/v1/chat/completions -H 'Content-type: application/json' -d '{"model": "write_tutorial","stream": true,"messages": [{"role": "user","content": "Write a tutorial about MySQL"}]}'
Due to the lack of updates or replies by the user for a long time, we will close it. Please reopen it if necessary.