Skip to content

Commit b7ed51e

Browse files
committed
Update sampling result fields to note new shape and stop reason
1 parent f6f54a6 commit b7ed51e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/specification/draft/client/sampling.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,15 +636,16 @@ and would therefore be unable to leverage them.
636636

637637
### Result Fields
638638

639-
Sampling results are [message](#messages) objects, and will contain the following fields:
639+
Sampling results will contain the following fields:
640640

641641
- `role`: The message role; see [Messages](#messages).
642-
- `content`: The message content; see [Messages](#messages).
642+
- `content`: The message content, which can be a single content block or an array of content blocks; see [Messages](#messages). When tools are used, this will be an array of content blocks (see [Sampling with Tools](#sampling-with-tools)).
643643
- `model`: The name of the model that generated the message.
644644
- `stopReason`: The reason why sampling stopped, if known. The specification defines the following (non-exhaustive) stop reasons, although implementations **MAY** provide their own arbitrary values:
645645
- `"endTurn"`: The participant is yielding the conversation to the other party.
646646
- `"stopSequence"`: Message generation encountered one of the requested `stopSequences`.
647647
- `"maxTokens"`: The token limit was reached.
648+
- `"toolUse"`: The model wants to use one or more tools.
648649

649650
## Error Handling
650651

0 commit comments

Comments
 (0)