Represents a single turn in a conversation history.
HistoryTurn
The user's message in this turn.
The assistant's response in this turn.
The assistant's thoughts in this turn.
Images associated with this turn.
Tool calls and results for this turn.
const historyTurn: HistoryTurn = { user: "What's the weather like?", assistant: "The weather is sunny with a temperature of 72°F.", tools: [ { call: { id: '1', name: 'getWeather', arguments: { location: 'New York' } }, response: { content: 'Sunny, 72°F' } } ]}; Copy
const historyTurn: HistoryTurn = { user: "What's the weather like?", assistant: "The weather is sunny with a temperature of 72°F.", tools: [ { call: { id: '1', name: 'getWeather', arguments: { location: 'New York' } }, response: { content: 'Sunny, 72°F' } } ]};
Optional
Represents a single turn in a conversation history.
HistoryTurn
Param: user
The user's message in this turn.
Param: assistant
The assistant's response in this turn.
Param: think
The assistant's thoughts in this turn.
Param: images
Images associated with this turn.
Param: tools
Tool calls and results for this turn.
Example