API Reference
SystemMessage
Defined in: types/system-message.ts:29
A system-prompt turn.
Remarks
This loop usually passes the system prompt as ModelRequest.system rather than
as a message, but the role is modeled for completeness and for histories that
carry one inline.
Abstraction over — OpenAI's system message ({ role, content }); timestamp
is the only extension. Whether sent inline or as ModelRequest.system, it
serializes to the same two fields on the wire.
Example
Wire shape (OpenAI chat-completions)
{ "role": "system", "content": "You are a helpful assistant." }Extends
MessageBase
Properties
| Property | Type | Description | Overrides | Inherited from | Defined in |
|---|---|---|---|---|---|
content | string | A system prompt is always plain text (narrows the multimodal base). | MessageBase.content | - | types/system-message.ts:33 |
role | System | Discriminant: the system-prompt turn. | - | - | types/system-message.ts:31 |
timestamp? | number | [extension — not in the OpenAI spec] Creation time (ms since epoch), for ordering. | - | MessageBase.timestamp | types/message-base.ts:35 |