langchain.js
    Preparing search index...

    Interface AIMessageFields<TStructure>

    interface AIMessageFields<
        TStructure extends MessageStructure = MessageStructure,
    > {
        additional_kwargs?: {
            function_call?: FunctionCall;
            tool_calls?: OpenAIToolCall[];
            [key: string]: unknown;
        };
        content?: $InferMessageContent<TStructure, "ai">;
        contentBlocks?: ContentBlock.Standard[];
        id?: string;
        invalid_tool_calls?: InvalidToolCall<string>[];
        name?: string;
        response_metadata?: Partial<$InferResponseMetadata<TStructure, "ai">>;
        tool_calls?: ToolCall<string, Record<string, any>>[];
        usage_metadata?: $InferMessageProperty<TStructure, "ai", "usage_metadata">;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    additional_kwargs?: {
        function_call?: FunctionCall;
        tool_calls?: OpenAIToolCall[];
        [key: string]: unknown;
    }

    Type Declaration

    • [key: string]: unknown
    • Optionalfunction_call?: FunctionCall

      Use "tool_calls" field on AIMessages instead

    • Optionaltool_calls?: OpenAIToolCall[]

      Use "tool_calls" field on AIMessages instead

    contentBlocks?: ContentBlock.Standard[]
    id?: string
    invalid_tool_calls?: InvalidToolCall<string>[]
    name?: string
    response_metadata?: Partial<$InferResponseMetadata<TStructure, "ai">>
    tool_calls?: ToolCall<string, Record<string, any>>[]
    usage_metadata?: $InferMessageProperty<TStructure, "ai", "usage_metadata">