Type Alias: GenerateOntologyResponse
@kortexya/reasoninglayer / GenerateOntologyResponse
Type Alias: GenerateOntologyResponse
Section titled “Type Alias: GenerateOntologyResponse”GenerateOntologyResponse = {
questions:OntologyClarificationQuestionDto[];sessionId:string;status:"needs_clarification";understood:object; } | {existingSortsCount:number;generationTimeMs:number;scenario:object;status:"complete"; } | {notes?:string|null;patch:object;stage:string;status:"patch"; }
Defined in: src/types/ontology.ts:94
Response for ontology generation.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ questions: OntologyClarificationQuestionDto[]; sessionId: string; status: "needs_clarification"; understood: object; }
questions
Section titled “questions”questions:
OntologyClarificationQuestionDto[]
Clarification questions the user must answer.
sessionId
Section titled “sessionId”sessionId:
string
Session ID to use in follow-up requests.
status
Section titled “status”status:
"needs_clarification"
Discriminator: clarification is needed.
understood
Section titled “understood”understood:
object
What the LLM already understood from the prompt.
Type Literal
Section titled “Type Literal”{ existingSortsCount: number; generationTimeMs: number; scenario: object; status: "complete"; }
existingSortsCount
Section titled “existingSortsCount”existingSortsCount:
number
Number of existing sorts found in the knowledge base.
generationTimeMs
Section titled “generationTimeMs”generationTimeMs:
number
Time taken for generation in milliseconds.
scenario
Section titled “scenario”scenario:
object
The generated scenario definition.
status
Section titled “status”status:
"complete"
Discriminator: generation is complete.
Type Literal
Section titled “Type Literal”{ notes?: string | null; patch: object; stage: string; status: "patch"; }
notes?
Section titled “notes?”
optionalnotes?:string|null
The model’s notes on the patch, when it left any.
patch:
object
The scenario keys this stage contributes, to merge into the draft.
stage:
string
The stage the patch belongs to (echoes GenerateOntologyRequest.stage).
status
Section titled “status”status:
"patch"
Discriminator: a staged patch (the request carried stage).
Remarks
Section titled “Remarks”Discriminated union by status field:
"needs_clarification"– the LLM needs more information before generating."complete"– the ontology has been generated successfully."patch"– a staged request’s patch for one stage.