https://github.com/gabrielfu/llm-streaming
https://github.com/gabrielfu/llm-streaming
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gabrielfu/llm-streaming
- Owner: gabrielfu
- Created: 2023-11-15T03:27:50.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-15T06:37:01.000Z (over 1 year ago)
- Last Synced: 2025-01-01T01:38:47.916Z (7 months ago)
- Language: Python
- Size: 541 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
In one shell, run
```shell
python server.py
```In another shell, run
```shell
python client.py
```Output:
[recording.mov](recording.mov)```
======================================
route: /stream, resp.iter_content()
======================================
b'c'
--------------------
b'h'
--------------------
b'u'
--------------------
b'n'
--------------------
b'k'
--------------------
b' '
--------------------
b'0'
--------------------
b'c'
--------------------
b'h'
--------------------
b'u'
--------------------
b'n'
--------------------
b'k'
--------------------
b' '
--------------------
b'1'
--------------------
b'c'
--------------------
b'h'
--------------------
b'u'
--------------------
b'n'
--------------------
b'k'
--------------------
b' '
--------------------
b'2'
--------------------
b'c'
--------------------
b'h'
--------------------
b'u'
--------------------
b'n'
--------------------
b'k'
--------------------
b' '
--------------------
b'3'
--------------------
b'c'
--------------------
b'h'
--------------------
b'u'
--------------------
b'n'
--------------------
b'k'
--------------------
b' '
--------------------
b'4'
--------------------
======================================
route: /sse, resp.iter_lines()
======================================
b'data: chunk 0'
--------------------
b'data: chunk 1'
--------------------
b'data: chunk 2'
--------------------
b'data: chunk 3'
--------------------
b'data: chunk 4'
--------------------
```