Skip to main content
Version: Next

Type Alias: LLMChatTurnResult

LLMChatTurnResult = object

Defined in: extensions/llm/tasks/llmChatSession.ts:84

Result returned by an LLM chat turn.

Properties​

finishReason​

readonly finishReason: "stop" | "cancelled" | "maxToolTurns"

Defined in: extensions/llm/tasks/llmChatSession.ts:95

Reason why the chat turn completed.

  • stop: The model completed its answer naturally without further tool calls.
  • cancelled: The session was stopped and the current turn was discarded.
  • maxToolTurns: The turn was terminated because it reached maxToolTurns.

messages​

readonly messages: readonly ChatMessage[]

Defined in: extensions/llm/tasks/llmChatSession.ts:86

The messages added to history during this chat turn.


stats​

readonly stats: readonly LLMGenerationStats[]

Defined in: extensions/llm/tasks/llmChatSession.ts:88

Generation performance statistics for each generation step in this turn.