Skip to content

Commit 2fce9fd

Browse files
committed
Clarify result content can be either a single block or an array
1 parent b7ed51e commit 2fce9fd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/specification/draft/client/sampling.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,12 @@ and would therefore be unable to leverage them.
639639
Sampling results will contain the following fields:
640640

641641
- `role`: The message role; 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)).
642+
- `content`: The message content. This can be either:
643+
- A single content block when the response contains only one content block, such as a single text response.
644+
- An array of content blocks when the response contains one or more content blocks, such as multiple tool uses or mixed content.
645+
646+
See [Messages](#messages) for content block types.
647+
643648
- `model`: The name of the model that generated the message.
644649
- `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:
645650
- `"endTurn"`: The participant is yielding the conversation to the other party.

0 commit comments

Comments
 (0)