Kizuki
    Preparing search index...

    Interface StudyOptions

    What the study controller needs from outside. Tests pass their own.

    interface StudyOptions {
        checkModels?: (
            settings: {
                chat: {
                    apiKeyEnv?: string;
                    baseURL: string;
                    model: string;
                    provider: "openai-compatible" | "gateway";
                    reasoning: "none" | "default";
                    replyShape: "server" | "prompt";
                };
                embed: {
                    apiKeyEnv?: string;
                    baseURL: string;
                    model: string;
                    provider: "openai-compatible"
                    | "gateway";
                };
                sendOutAllowed: boolean;
            },
            env?: Env,
            fetchImpl?: (
                input: string | URL | Request,
                init?: RequestInit,
            ) => Promise<Response>,
        ) => Promise<ModelCheck>;
        env?: Env;
        home: string;
        models?: Models;
        onQuit?: () => void;
        openFile?: (path: string) => void;
        today?: () => string;
    }
    Index
    checkModels?: (
        settings: {
            chat: {
                apiKeyEnv?: string;
                baseURL: string;
                model: string;
                provider: "openai-compatible" | "gateway";
                reasoning: "none" | "default";
                replyShape: "server" | "prompt";
            };
            embed: {
                apiKeyEnv?: string;
                baseURL: string;
                model: string;
                provider: "openai-compatible"
                | "gateway";
            };
            sendOutAllowed: boolean;
        },
        env?: Env,
        fetchImpl?: (
            input: string | URL | Request,
            init?: RequestInit,
        ) => Promise<Response>,
    ) => Promise<ModelCheck>

    Asks the model servers which models they have. Defaults to the real check.

    Type Declaration

      • (
            settings: {
                chat: {
                    apiKeyEnv?: string;
                    baseURL: string;
                    model: string;
                    provider: "openai-compatible" | "gateway";
                    reasoning: "none" | "default";
                    replyShape: "server" | "prompt";
                };
                embed: {
                    apiKeyEnv?: string;
                    baseURL: string;
                    model: string;
                    provider: "openai-compatible"
                    | "gateway";
                };
                sendOutAllowed: boolean;
            },
            env?: Env,
            fetchImpl?: (
                input: string | URL | Request,
                init?: RequestInit,
            ) => Promise<Response>,
        ): Promise<ModelCheck>
      • Checks that the model servers answer and both models are installed, with fix-it messages.

        Parameters

        • settings: {
              chat: {
                  apiKeyEnv?: string;
                  baseURL: string;
                  model: string;
                  provider: "openai-compatible" | "gateway";
                  reasoning: "none" | "default";
                  replyShape: "server" | "prompt";
              };
              embed: {
                  apiKeyEnv?: string;
                  baseURL: string;
                  model: string;
                  provider: "openai-compatible"
                  | "gateway";
              };
              sendOutAllowed: boolean;
          }
          • chat: {
                apiKeyEnv?: string;
                baseURL: string;
                model: string;
                provider: "openai-compatible" | "gateway";
                reasoning: "none" | "default";
                replyShape: "server" | "prompt";
            }
            • OptionalapiKeyEnv?: string

              The name of the environment variable that holds the API key. The key itself is never saved.

            • baseURL: string
            • model: string
            • provider: "openai-compatible" | "gateway"

              How Kizuki talks to a model server. openai-compatible: any server that speaks the OpenAI format, such as Ollama and MLX. gateway: Vercel AI Gateway, through the AI SDK's own gateway provider.

            • reasoning: "none" | "default"

              none turns thinking off, which is faster on small local models. default leaves it to the model.

            • replyShape: "server" | "prompt"

              How replies are kept in the right shape. server: the server enforces it (Ollama, OpenAI). prompt: Kizuki describes the shape in the prompt and checks the reply itself, for servers that ignore it (MLX).

          • embed: {
                apiKeyEnv?: string;
                baseURL: string;
                model: string;
                provider: "openai-compatible" | "gateway";
            }
            • OptionalapiKeyEnv?: string
            • baseURL: string
            • model: string
            • provider: "openai-compatible" | "gateway"

              How Kizuki talks to a model server. openai-compatible: any server that speaks the OpenAI format, such as Ollama and MLX. gateway: Vercel AI Gateway, through the AI SDK's own gateway provider.

          • sendOutAllowed: boolean

            True once you agreed to send your material to a model off this computer. Settings that send it out can't be saved without it.

        • env: Env = process.env
        • fetchImpl: (input: string | URL | Request, init?: RequestInit) => Promise<Response> = fetch

        Returns Promise<ModelCheck>

    env?: Env

    Environment variables, for API keys.

    home: string

    The home folder.

    models?: Models

    Overrides the models made from settings. Tests pass fake ones.

    onQuit?: () => void

    Called when you quit.

    openFile?: (path: string) => void

    Opens a file in its usual app.

    today?: () => string

    Today's date as YYYY-MM-DD. Defaults to the computer's date.