rednode API - v0.50.0
    Preparing search index...

    Interface AgentRequest

    A question as the assistant package receives it in agent.serve.

    interface AgentRequest {
        context?: unknown;
        from: { id: string; name: string };
        prompt: string;
        signal: AbortSignal;
        write(text: string): void;
    }
    Index
    context?: unknown
    from: { id: string; name: string }

    The package that asks.

    prompt: string
    signal: AbortSignal

    Aborted when the asker cancels.

    • Sends a piece of the answer to the asker while it is written.

      Parameters

      • text: string

      Returns void