# Streaming Output

Following the tutorial on [QuickStart](https://docs.activeloop.ai/setup/quickstart), instead of waiting the whole reasoning to be completed, you can stream intermediate tokens.&#x20;

```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.activeloop.ai/",
    api_key=os.getenv('ACTIVELOOP_TOKEN')
)

stream = client.chat.completions.create(
    model="activeloop-l0",
    messages=[{"role": "user", "content": "what is the AIME score of DeepSeek R1?"}],
    stream=True,
)

for event in stream:
    print(event)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.activeloop.ai/user-guide/streaming-output.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
