Values.CountTokensInputSourceThe input value for token counting. The value should be either an InvokeModel or Converse request body.
type nonrec t = {invokeModel : InvokeModelTokensRequest.t option;An InvokeModel request for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to the InvokeModel operation.
*)converse : ConverseTokensRequest.t option;A Converse request for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to the Converse operation.
*)}val to_value :
t ->
[> `Structure of
(string
* [> `Structure of
(string
* [> `Blob of Body.t
| `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 ])
list ]