[Agents] Add structured output section#457
Draft
dannyjameswilliams wants to merge 2 commits into
Draft
Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
|
|
||
| Structured outputs are supported with [streaming ask mode](../guides/ask_mode.md#streaming). | ||
|
|
||
| When streaming, the structured output is delivered incrementally as raw string fragments through `StreamedTokens` instances. No special parsing is applied during the stream — each token is simply a piece of the final output. To use the result, accumulate the streamed tokens into a single string, then validate the completed string against your schema. You can also attempt partial validation as the string grows if you want to react to the output before the stream finishes. |
There was a problem hiding this comment.
To use the result, accumulate the streamed tokens into a single string, then validate the completed string against your schema.
If you're happy waiting until the stream has finished, you can just read the result from the final response (which has it fully parsed).
Contributor
Author
There was a problem hiding this comment.
Thanks yeah, this was an oversight. Added more detail now + changed the python/TS headers to just bold text so it doesn't appear on the side panel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Not to be merged until agents has released this feature
What's being changed:
New section to the query agent docs for the soon supported structured outputs feature. Added link to relevant index + references in other pages.
Type of change:
How has this been tested?
yarn start