Skip to main content

TurnMessage

@forge/monorepo


@forge/monorepo / backend/src / TurnMessage

Type Alias: TurnMessage

TurnMessage = object

Defined in: backend/src/models/streaming.ts:35

Properties

content

readonly content: string | readonly TurnContentPart[]

Defined in: backend/src/models/streaming.ts:44

A string for a text turn, parts when the turn carries an attachment.

A union rather than text plus an optional parts, which was the other option and is worse: two fields that can both carry text leave the relationship between them undefined, and somebody eventually sets one and reads the other.


role

readonly role: "system" | "user" | "assistant"

Defined in: backend/src/models/streaming.ts:36