Interface: ConversationMessageRequest
@kortexya/reasoninglayer / ConversationMessageRequest
Interface: ConversationMessageRequest
Section titled “Interface: ConversationMessageRequest”Defined in: src/types/conversation.ts:15
Request to send a message in a conversation.
Remarks
Section titled “Remarks”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).
Properties
Section titled “Properties”constrainedDecode?
Section titled “constrainedDecode?”
optionalconstrainedDecode?:boolean|null
Defined in: src/types/conversation.ts:43
Per-request override for constrained-decode repair of a hallucinated query.
Remarks
Section titled “Remarks”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.
contextTermIds?
Section titled “contextTermIds?”
optionalcontextTermIds?:string[]
Defined in: src/types/conversation.ts:86
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.
conversationId?
Section titled “conversationId?”
optionalconversationId?:string|null
Defined in: src/types/conversation.ts:23
Optional conversation ID to continue an existing conversation. If omitted, a new conversation is created.
currentSortContext?
Section titled “currentSortContext?”
optionalcurrentSortContext?:string|null
Defined in: src/types/conversation.ts:29
Optional sort name hint from the current page context.
generateCertificate?
Section titled “generateCertificate?”
optionalgenerateCertificate?:boolean
Defined in: src/types/conversation.ts:32
When true, generate a cryptographic validity certificate for this response.
includePromptTrace?
Section titled “includePromptTrace?”
optionalincludePromptTrace?:boolean
Defined in: src/types/conversation.ts:79
Ask for the privileged ConversationMessageResponse.promptTrace diagnostic.
Remarks
Section titled “Remarks”Honoured only on a deployment that set OSFKB_CONVERSATION_PROMPT_TRACE,
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.
injection?
Section titled “injection?”
optionalinjection?:InjectionPolicy|null
Defined in: src/types/conversation.ts:66
Adaptive ontology injection for this turn: tier the prompt’s sorts by the model’s parametric coverage κ under a tokenizer-counted budget.
Remarks
Section titled “Remarks”Absent (or null) means blanket injection, the default. When set, the
response carries ConversationMessageResponse.injection.
message
Section titled “message”message:
string
Defined in: src/types/conversation.ts:17
The user’s natural language message.
model?
Section titled “model?”
optionalmodel?:string|null
Defined in: src/types/conversation.ts:56
Model id selecting which served NL→OSFQL endpoint answers this turn.
Remarks
Section titled “Remarks”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().
queryMode?
Section titled “queryMode?”
optionalqueryMode?:ChatQueryMode|null
Defined in: src/types/conversation.ts:95
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). Absent: the deployment default
(OSFKB_CHAT_QUERY_MODE, itself text unless set).
queryModel?
Section titled “queryModel?”
optionalqueryModel?:string|null
Defined in: src/types/conversation.ts:101
An internal query translator id (from /api/v1/query-models). Answer
generation keeps using the conversation model.
sessionId?
Section titled “sessionId?”
optionalsessionId?:string|null
Defined in: src/types/conversation.ts:26
Session ID for session tracking.