Skip to content

Type Alias: GenerateOntologyResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Ontology / GenerateOntologyResponse

Type Alias: GenerateOntologyResponse

GenerateOntologyResponse = { questions: OntologyClarificationQuestionDto[]; sessionId: string; status: "needs_clarification"; understood: object; } | { existingSortsCount: number; generationTimeMs: number; scenario: object; status: "complete"; }

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

Response for ontology generation.

Type Declaration

{ questions: OntologyClarificationQuestionDto[]; sessionId: string; status: "needs_clarification"; understood: object; }

questions

questions: OntologyClarificationQuestionDto[]

Clarification questions the user must answer.

sessionId

sessionId: string

Session ID to use in follow-up requests.

status

status: "needs_clarification"

Discriminator: clarification is needed.

understood

understood: object

What the LLM already understood from the prompt.

{ existingSortsCount: number; generationTimeMs: number; scenario: object; status: "complete"; }

existingSortsCount

existingSortsCount: number

Number of existing sorts found in the knowledge base.

generationTimeMs

generationTimeMs: number

Time taken for generation in milliseconds.

scenario

scenario: object

The generated scenario definition.

status

status: "complete"

Discriminator: generation is complete.

Remarks

Discriminated union by status field:

  • "needs_clarification" — the LLM needs more information before generating.
  • "complete" — the ontology has been generated successfully.