Values.ConverseTokensRequestSourceThe inputs from a Converse API request for token counting. This structure mirrors the input format for the Converse operation, allowing you to count tokens for conversation-based inference requests.
type nonrec t = {messages : Messages.t option;An array of messages to count tokens for.
*)system : SystemContentBlocks.t option;The system content blocks to count tokens for. System content provides instructions or context to the model about how it should behave or respond. The token count will include any system content provided.
*)toolConfig : ToolConfiguration.t option;The toolConfig of Converse input request to count tokens for. Configuration information for the tools that the model can use when generating a response.
*)additionalModelRequestFields : Document.t option;The additionalModelRequestFields of Converse input request to count tokens for. Use this field when you want to pass additional parameters that the model supports.
*)}val to_value :
t ->
[> `Structure of
(string
* [> `List of
[> `Structure of
(string
* [> `Enum of string
| `List of
[> `Structure of
(string
* [> `String of String_.t
| `Structure of
(string
* [> `Blob of Blob.t
| `Enum of string
| `List of
[> `Structure of
(string
* [> `List of
[> `Structure of
(string
* [> `String of
String_.t ])
list ]
list
| `String of String_.t
| `Structure of
(string
* [> `Enum of string
| `List of
[> `Structure of
(string
* [> `String of
String_.t ])
list ]
list
| `String of
DocumentBlockNameString.t
| `Structure of
(string
* [> `Blob of
ImageSourceBytesBlob.t
| `Boolean of
Boolean.t
| `Integer of
DocumentCharLocationDocumentIndexInteger.t
| `List of
[> `Structure of
(string
* [>
`String of
String_.t ])
list ]
list
| `String of
String_.t
| `Structure of
(string
* [> `String of
S3Uri.t ])
list ])
list ])
list ])
list ]
list
| `String of DocumentBlockNameString.t
| `Structure of
(string
* [> `Blob of ImageSourceBytesBlob.t
| `Boolean of Boolean.t
| `Enum of string
| `List of
[> `Enum of string
| `Structure of
(string
* [> `String of String_.t ])
list ]
list
| `String of String_.t
| `Structure of
(string
* [> `Blob of
GuardrailConverseImageSourceBytesBlob.t
| `String of S3Uri.t ])
list ])
list ])
list ])
list ]
list
| `String of NonEmptyString.t
| `Structure of
(string
* [> `Enum of string
| `Structure of
(string
* [> `Enum of string
| `List of [> `Enum of string ] list
| `String of String_.t
| `Structure of
(string
* [> `Blob of
GuardrailConverseImageSourceBytesBlob.t ])
list ])
list ])
list ])
list ]
list
| `Structure of
(string
* [> `List of
[> `Structure of
(string
* [> `Structure of
(string
* [> `Boolean of Boolean.t
| `Enum of string
| `String of ToolName.t
| `Structure of
(string * [> `Structure of 'a list ])
list ])
list ])
list ]
list
| `Structure of
(string
* [> `Structure of (string * [> `String of ToolName.t ]) list ])
list ])
list ])
list ]