Update README.md

This commit is contained in:
Ishaan Jaff 2023-08-05 15:12:34 -07:00 committed by GitHub
parent 1c1ee94481
commit 6e6ec8c65f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,9 +51,9 @@ Stable version
pip install litellm==0.1.1 pip install litellm==0.1.1
``` ```
## streaming queries ## Streaming Queries
liteLLM supports streaming the model response back, pass `stream=True` to get a streaming iterator in response. liteLLM supports streaming the model response back, pass `stream=True` to get a streaming iterator in response.
``` ```python
response = completion(model="gpt-3.5-turbo", messages=messages, stream=True) response = completion(model="gpt-3.5-turbo", messages=messages, stream=True)
for chunk in response: for chunk in response:
print(chunk['choices'][0]['delta']) print(chunk['choices'][0]['delta'])