diff --git a/README.md b/README.md index 6dcebfbd3d..5903416470 100644 --- a/README.md +++ b/README.md @@ -132,11 +132,15 @@ print(response) ## Streaming ([Docs](https://docs.litellm.ai/docs/completion/stream)) -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. Streaming is supported for all models (Bedrock, Huggingface, TogetherAI, Azure, OpenAI, etc.) ```python from litellm import completion + +messages = [{"content": "Hello, how are you?", "role": "user"}] + +# gpt-4o response = completion(model="openai/gpt-4o", messages=messages, stream=True) for part in response: print(part.choices[0].delta.content or "")