proposit-core
    Preparing search index...

    Function llmStage

    • Type Parameters

      • TOutput

      Parameters

      • config: {
            buildPrompt: (ctx: TStageContext) => { system: string; user: string };
            checkOutput?: (
                output: TOutput,
                ctx: TStageContext,
            ) => TLlmOutputCheckFailure | undefined;
            dependsOn: readonly TDepSpec[];
            id: string;
            maxOutputTokens?: number;
            model: string;
            outputSchema: TSchema;
            reasoningEffort?: TReasoningEffort;
            retry?: Partial<TRetryPolicy>;
            tools?: readonly TToolSpec[];
        }
        • buildPrompt: (ctx: TStageContext) => { system: string; user: string }
        • OptionalcheckOutput?: (output: TOutput, ctx: TStageContext) => TLlmOutputCheckFailure | undefined

          A check of the output's content, run once it matches the schema. A returned failure is handled exactly like a schema mismatch: the attempt is retried under the stage's retry policy (schema_validation must be in retryOn), and when the attempts run out the stage fails with that failure's code and message. It reads the stage context, so on the launch/complete path it runs only when completeStage is given the upstream outputs.

        • dependsOn: readonly TDepSpec[]
        • id: string
        • OptionalmaxOutputTokens?: number
        • model: string
        • outputSchema: TSchema
        • OptionalreasoningEffort?: TReasoningEffort
        • Optionalretry?: Partial<TRetryPolicy>
        • Optionaltools?: readonly TToolSpec[]

      Returns TStage<TOutput>