File

ai/ai.model.ts

Description

A message exchanged between the user and the AI assistant.

This API is a "preview" and may change in future.

Index

Properties

Properties

content
content: string
Type : string

The content if this is a user or system message. For assistant messages, instead you should use the text parts returned in steps, especially the last non-empty one which contains the final answer.

finishReason
finishReason: "stop" | "error" | "tool_use"
Type : "stop" | "error" | "tool_use"
Optional
role
role: "user" | "assistant" | "system"
Type : "user" | "assistant" | "system"

Indicates whether the message came from the user or AI assistant.

Also possible is a hidden "system" message (like a system prompt, but later in the message stream).

steps
steps: Array<AgentStep>
Type : Array<AgentStep>
Optional
timestamp
timestamp: string
Type : string
Optional

results matching ""

    No results matching ""