Skip to content

Interface: ConversationMessageRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ConversationMessageRequest

Defined in: src/types/conversation.ts:16

Request to send a message in a conversation.

The conversation service translates natural language to OSFQL, executes it (with up to 3 self-correction retries on failure), and returns both the generated OSFQL and the results.

Reuse conversationId from a previous response for multi-turn context (pronoun resolution, follow-up queries).

optional clarificationSelection?: ClarificationSelection | null

Defined in: src/types/conversation.ts:34


optional clarifyAfterRepeats?: number

Defined in: src/types/conversation.ts:33


optional confirmExternal?: boolean

Defined in: src/types/conversation.ts:24

Confirm the current question’s web search when the Space requires confirmation.


optional constrainedDecode?: boolean | null

Defined in: src/types/conversation.ts:63

Per-request override for constrained-decode repair of a hallucinated query.

false disables the repair — the certify-or-abstain gate just abstains, surfacing the raw model output. true / omitted keep the default (repair when configured). Lets a UI toggle constrained decoding to compare the correction against the raw query. See ConversationMessageResponse.repaired.


optional contentProbeOptions?: ContentProbeOptions | null

Defined in: src/types/conversation.ts:35


optional contextTermIds?: string[]

Defined in: src/types/conversation.ts:106

Records the question is about, by term id. The engine reads at most 8, loads them from this tenant itself and answers from them as retrieved knowledge. An id the tenant does not hold is ignored.


optional conversationId?: string | null

Defined in: src/types/conversation.ts:43

Optional conversation ID to continue an existing conversation. If omitted, a new conversation is created.


optional currentSortContext?: string | null

Defined in: src/types/conversation.ts:49

Optional sort name hint from the current page context.


optional followUpTo?: string | null

Defined in: src/types/conversation.ts:30

Assistant turn whose resolved query frame this request refines.


optional generateCertificate?: boolean

Defined in: src/types/conversation.ts:52

When true, generate a cryptographic validity certificate for this response.


optional includePromptTrace?: boolean

Defined in: src/types/conversation.ts:99

Ask for the privileged ConversationMessageResponse.promptTrace diagnostic.

Honoured only on a deployment that enabled prompt tracing, for a caller carrying platform_admin. Any other caller that sets it is refused with 403 (a ForbiddenError) before the pipeline runs — on the streaming route too, before the stream opens. An ordinary client never sets it.


optional injection?: InjectionPolicy | null

Defined in: src/types/conversation.ts:86

Adaptive ontology injection for this turn: tier the prompt’s sorts by the model’s parametric coverage κ under a tokenizer-counted budget.

Absent (or null) means blanket injection, the default. When set, the response carries ConversationMessageResponse.injection.


message: string

Defined in: src/types/conversation.ts:37

The user’s natural language message.


optional model?: string | null

Defined in: src/types/conversation.ts:76

Model id selecting which served NL→OSFQL endpoint answers this turn.

Omitted means the server’s default LLM. Drives side-by-side model comparison — one call per model — and is echoed back as ConversationMessageResponse.modelId, which the server populates only when this is set.

The ids come from the compare registry: client.conversation.listModels().


optional projectId?: string | null

Defined in: src/types/conversation.ts:28

Project for a new conversation, or the current project when continuing one.


optional queryMode?: ChatQueryMode | null

Defined in: src/types/conversation.ts:114

How a read question becomes a query this turn: text (the model writes OSFQL), frame (the model fills a schema-typed query frame under provider-enforced structured output), or auto (frames wherever the model adapter enforces a schema, else text). When omitted, uses the deployment default (initially text).


optional queryModel?: string | null

Defined in: src/types/conversation.ts:120

An internal query translator id (from /api/v1/query-models). Answer generation keeps using the conversation model.


optional resumeAnswer?: string | null

Defined in: src/types/conversation.ts:32

Review this frozen answer without reading new sources.


optional searchWeb?: boolean

Defined in: src/types/conversation.ts:26

Search the web for this turn within the Space’s settings and boundary.


optional sessionId?: string | null

Defined in: src/types/conversation.ts:46

Session ID for session tracking.


optional sourceScope?: ConversationSourceScope | null

Defined in: src/types/conversation.ts:22

Which sources the question reads: all (default), news (web_page, feed_item and the sorts below them) or knowledge (every other sort, acquired_record included).