-
Notifications
You must be signed in to change notification settings - Fork 475
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
streaming: True | ||
``` | ||
Note that, the `enabled: True` filed is needed to enable streaming output rails while `streaming: True` is needed to enable streaming generation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove "Note that," and start with "The @Pouyanpi, is the description for the top-level |
||
|
||
1. Call the `stream_async` method and handle the chunked response: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -689,6 +689,7 @@ rails: | |
chunk_size: 200 | ||
context_size: 50 | ||
stream_first: True | ||
enabled: True | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
``` | ||
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 ( |
||
|
||
- `False` | ||
``` | ||
|
||
The following table shows how the number of tokens, chunk size, and context size interact to trigger the number of rails invocations. | ||
|
There was a problem hiding this comment.
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:
?