Class ListAssistantMessageDetailsCommand

Get the detailed content blocks of a single assistant message in a paginated way.

This endpoint returns all content blocks (thinking, text, tool use, and tool result blocks) in the exact order they occurred during message generation, allowing full reconstruction of the streaming sequence including interleaved thinking and text content.

Use a bare-bones client and the command you need to make an API call.

import { Apiv2Client, ListAssistantMessageDetailsCommand } from "@codegrade/apiv2-client"; // ES Modules import
// const { Apiv2Client, ListAssistantMessageDetailsCommand } = require("@codegrade/apiv2-client"); // CommonJS import
// import type { Apiv2ClientConfig } from "@codegrade/apiv2-client";
const config = {}; // type is Apiv2ClientConfig
const client = new Apiv2Client(config);
const input = { // ListAssistantMessageDetailsRequest
assistantId: "STRING_VALUE", // required
conversationId: "STRING_VALUE", // required
messageId: "STRING_VALUE", // required
nextToken: "STRING_VALUE",
pageSize: Number("int"),
};
const command = new ListAssistantMessageDetailsCommand(input);
const response = await client.send(command);
// { // ListAssistantMessageDetailsResponse
// blocks: [ // AssistantMessageContentBlocks // required
// { // AssistantMessageContentBlock Union: only one key present
// thinking: { // AssistantMessageThinkingBlock
// content: "STRING_VALUE", // required
// },
// toolUse: { // AssistantMessageToolUseBlock
// name: "STRING_VALUE", // required
// summary: "STRING_VALUE", // required
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };

ListAssistantMessageDetailsCommandInput

InternalServerError (server fault) An internal failure at the fault of the server.

BadRequestError (client fault) An error at the fault of the client sending invalid input.

NotFoundError (client fault) An error due to the client attempting to access a missing resource.

NotAuthorizedError (client fault) An error due to the client not being authorized to access the resource.

NotAuthenticatedError (client fault) An error due to the client not being authenticated.

ValidationError (client fault) A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.

Apiv2ServiceException

Base exception class for all service exceptions from Apiv2 service.

Hierarchy

Constructors

  • Returns ListAssistantMessageDetailsCommand

  • Parameters

    Returns ListAssistantMessageDetailsCommand

Properties

schema?: OperationSchema | StaticOperationSchema

This should be OperationSchema from @smithy/types, but would create problems with the client transform type adaptors.

__types: {
    api: {
        input: ListAssistantMessageDetailsRequest;
        output: ListAssistantMessageDetailsResponse;
    };
    sdk: {
        input: ListAssistantMessageDetailsCommandInput;
        output: ListAssistantMessageDetailsCommandOutput;
    };
}

type navigation helper, not in runtime.

Methods

  • Internal

    Parameters

    • clientStack: MiddlewareStack<any, any>
    • configuration: { logger: Logger; requestHandler: RequestHandler<any, any, any> }
    • options: any
    • __namedParameters: ResolveMiddlewareContextArgs

    Returns InitializeHandler<any, ListAssistantMessageDetailsCommandOutput>

  • Returns EndpointParameterInstructions