(turns: Iterable<Turn>, completion_messages?: { [x: string]: unknown; role: string; content: string; }[]): { [x: string]: unknown; role: string; content: string; }[] Creates a thread history array for model consumption from a collection of turns. Normalizes content for assistant turns with responses.
turns
type
Iterable<Turn>completion_messages
type
{ [x: string]: unknown; role: string; content: string; }[] default
[]returns
{ [x: string]: unknown; role: string; content: string; }[]