langchain.js
Preparing search index...
@langchain/core
messages
AIMessageFields
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
TStructure
extends
MessageStructure
=
MessageStructure
Hierarchy (
View Summary
)
BaseMessageFields
<
TStructure
,
"ai"
>
AIMessageFields
Implemented by
AIMessage
Index
Properties
additional_
kwargs?
content?
content
Blocks?
id?
invalid_
tool_
calls?
name?
response_
metadata?
tool_
calls?
usage_
metadata?
Properties
Optional
additional_
kwargs
additional_kwargs
?:
{
function_call
?:
FunctionCall
;
tool_calls
?:
OpenAIToolCall
[]
;
[
key
:
string
]:
unknown
;
}
Type Declaration
[
key
:
string
]:
unknown
Optional
function_call
?:
FunctionCall
Deprecated
Use "tool_calls" field on AIMessages instead
Optional
tool_calls
?:
OpenAIToolCall
[]
Deprecated
Use "tool_calls" field on AIMessages instead
Deprecated
Optional
content
content
?:
$InferMessageContent
<
TStructure
,
"ai"
>
Optional
content
Blocks
contentBlocks
?:
ContentBlock
.
Standard
[]
Optional
id
id
?:
string
Optional
invalid_
tool_
calls
invalid_tool_calls
?:
InvalidToolCall
<
string
>
[]
Optional
name
name
?:
string
Optional
response_
metadata
response_metadata
?:
Partial
<
$InferResponseMetadata
<
TStructure
,
"ai"
>
>
Optional
tool_
calls
tool_calls
?:
ToolCall
<
string
,
Record
<
string
,
any
>
>
[]
Optional
usage_
metadata
usage_metadata
?:
$InferMessageProperty
<
TStructure
,
"ai"
,
"usage_metadata"
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
additional_
kwargs
content
content
Blocks
id
invalid_
tool_
calls
name
response_
metadata
tool_
calls
usage_
metadata
langchain.js
Loading...
Deprecated
Use "tool_calls" field on AIMessages instead