Module Values.ContentBlockSource

A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.

Sourcetype nonrec t = {
  1. text : String_.t option;
    (*

    Text to include in the message.

    *)
  2. image : ImageBlock.t option;
    (*

    Image to include in the message. This field is only supported by Anthropic Claude 3 models.

    *)
  3. document : DocumentBlock.t option;
    (*

    A document to include in the message.

    *)
  4. video : VideoBlock.t option;
    (*

    Video to include in the message.

    *)
  5. audio : AudioBlock.t option;
    (*

    An audio content block containing audio data in the conversation.

    *)
  6. toolUse : ToolUseBlock.t option;
    (*

    Information about a tool use request from a model.

    *)
  7. toolResult : ToolResultBlock.t option;
    (*

    The result for a tool request that a model makes.

    *)
  8. guardContent : GuardrailConverseContentBlock.t option;
    (*

    Contains the content to assess with the guardrail. If you don't specify guardContent in a call to the Converse API, the guardrail (if passed in the Converse API) assesses the entire message. For more information, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.

    *)
  9. cachePoint : CachePointBlock.t option;
    (*

    CachePoint to include in the message.

    *)
  10. reasoningContent : ReasoningContentBlock.t option;
    (*

    Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

    *)
  11. citationsContent : CitationsContentBlock.t option;
    (*

    A content block that contains both generated text and associated citation information, providing traceability between the response and source documents.

    *)
  12. searchResult : SearchResultBlock.t option;
    (*

    Search result to include in the message.

    *)
}
Sourceval make : ?text:??? -> ?image:??? -> ?document:??? -> ?video:??? -> ?audio:??? -> ?toolUse:??? -> ?toolResult:??? -> ?guardContent:??? -> ?cachePoint:??? -> ?reasoningContent:??? -> ?citationsContent:??? -> ?searchResult:??? -> unit -> t
Sourceval to_value : t -> [> `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 ]
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