Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gabrielfu/llm-streaming


https://github.com/gabrielfu/llm-streaming

Last synced: 25 days ago
JSON representation

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'
--------------------
```