Module Values.CountTokensInputSource

The input value for token counting. The value should be either an InvokeModel or Converse request body.

Sourcetype nonrec t = {
  1. 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.

    *)
  2. 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.

    *)
}
Sourceval make : ?invokeModel:??? -> ?converse:??? -> unit -> t
Sourceval 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 ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t