MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

How should I use stream_output_via_api.py in examples folder correctly?

Open yousia33 opened this issue 1 year ago • 1 comments

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.

yousia33 avatar Jun 16 '24 02:06 yousia33

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"}]}'

voidking avatar Jun 17 '24 13:06 voidking

Due to the lack of updates or replies by the user for a long time, we will close it. Please reopen it if necessary.

better629 avatar Oct 09 '24 17:10 better629