Module Values.InvokeModelWithBidirectionalStreamRequestSource

Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed. It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.

Sourcetype nonrec t = {
  1. modelId : InvokeModelIdentifier.t;
    (*

    The model ID or ARN of the model ID to use. Currently, only amazon.nova-sonic-v1:0 is supported.

    *)
  2. body : InvokeModelWithBidirectionalStreamInput.t;
    (*

    The prompt and inference parameters in the format specified in the BidirectionalInputPayloadPart in the header. You must provide the body in JSON format. To see the format and content of the request and response bodies for different models, refer to Inference parameters. For more information, see Run inference in the Bedrock User Guide.

    *)
}
Sourceval context_ : string
Sourceval to_value : t -> [> `Structure of (string * [> `String of InvokeModelIdentifier.t | `Structure of (string * [> `Structure of (string * [> `Blob of PartBody.t ]) 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