openai: return usage as final chunk for streams (#6784)

* openai: return usage as final chunk for streams

---------

Co-authored-by: ParthSareen <parth.sareen@ollama.com>
This commit is contained in:
Anuraag (Rag) Agrawal 2024-12-13 10:09:30 +09:00 committed by GitHub
parent c216850523
commit e28f2d4900
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 176 additions and 33 deletions

View file

@ -233,6 +233,8 @@ curl http://localhost:11434/v1/embeddings \
- [x] `seed`
- [x] `stop`
- [x] `stream`
- [x] `stream_options`
- [x] `include_usage`
- [x] `temperature`
- [x] `top_p`
- [x] `max_tokens`
@ -261,6 +263,8 @@ curl http://localhost:11434/v1/embeddings \
- [x] `seed`
- [x] `stop`
- [x] `stream`
- [x] `stream_options`
- [x] `include_usage`
- [x] `temperature`
- [x] `top_p`
- [x] `max_tokens`