Skip to content

docs: fix output rail doc #1159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/getting-started/5-output-rails/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ You can enable streaming to provide asynchronous responses and reduce the time t
streaming:
chunk_size: 200
context_size: 50
enabled: True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind making this the first field underneath streaming:?


streaming: True
```
Note that, the `enabled: True` filed is needed to enable streaming output rails while `streaming: True` is needed to enable streaming generation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove "Note that," and start with "The enabled...." Please also add a line above for ease of review by future maintainers. (nit: typo for field.)

@Pouyanpi, is the description for the top-level streaming field accurate? (I wish that I knew better myself.)


1. Call the `stream_async` method and handle the chunked response:

Expand Down
8 changes: 7 additions & 1 deletion docs/user-guides/configuration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ You can enable streaming to begin receiving responses from the output rail soone

You must set the top-level `streaming: True` field in your `config.yml` file.

For each output rail, add the `streaming` field and configuration parameters.
For the output rails, add the `streaming` field and configuration parameters.

```yaml
rails:
Expand All @@ -689,6 +689,7 @@ rails:
chunk_size: 200
context_size: 50
stream_first: True
enabled: True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with the previous comment, do you mind making this the first field beneath "streaming:"?


streaming: True
```
Expand Down Expand Up @@ -742,6 +743,11 @@ The following table describes the subfields for the `streaming` field:
By default, the toolkit streams the chunks as soon as possible and before applying output rails to them.

- `True`

* - streaming.enabled
- When set to True enable the execution of the output rails in streaming mode.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind putting this row in alphabetical order?

Thanks for following the "When set..." pattern. Do you mind enclosing True in backticks (True) and following with a comma? Maybe also revise to "When set to True, the toolkit executes output rails in streaming mode."


- `False`
```

The following table shows how the number of tokens, chunk size, and context size interact to trigger the number of rails invocations.
Expand Down