Interface: DraftFunctionRequest
@kortexya/reasoninglayer / DraftFunctionRequest
Interface: DraftFunctionRequest
Section titled “Interface: DraftFunctionRequest”Defined in: src/types/functions.ts:321
Request an AI draft of a function from a natural-language description.
Remarks
Section titled “Remarks”Supports a multi-turn clarification loop. On the first call, provide only description.
If the response status is "needs_clarification", call again with the returned sessionId
plus an answers map keyed by question id. To refine an existing draft, pass it as
currentDraft — the model treats it as the base to revise.
The endpoint never writes to the knowledge base; it returns a validated draft for review.
Properties
Section titled “Properties”answers?
Section titled “answers?”
optionalanswers?:object|null
Defined in: src/types/functions.ts:323
Answers to clarification questions, keyed by question id (2nd call).
currentDraft?
Section titled “currentDraft?”
optionalcurrentDraft?:RegisterFunctionRequest|null
Defined in: src/types/functions.ts:325
A prior draft to revise (refine loop) — the model treats it as the base.
description
Section titled “description”description:
string
Defined in: src/types/functions.ts:327
What the function should do, in plain language.
sessionId?
Section titled “sessionId?”
optionalsessionId?:string|null
Defined in: src/types/functions.ts:329
Session ID for multi-turn clarification (client-echoed; the server is stateless).