actrone-memory
    Preparing search index...

    Interface ChatCompleterLike

    Minimal structural interface for an OpenAI-compatible chat client (an openai SDK OpenAI instance satisfies it, as examples/local-extraction.ts type-checks), injected so actrone-memory needs no hard openai dependency. The roles are the literal ones the extractor sends: the SDK's message types reject a plain string role, which made a real client fail to compile here.

    interface ChatCompleterLike {
        chat: {
            completions: {
                create(
                    args: {
                        model: string;
                        messages: { role: "user" | "system"; content: string }[];
                        response_format?: ExtractionResponseFormat;
                        max_tokens?: number;
                        temperature?: number;
                    },
                ): Promise<{ choices: { message: { content: string | null } }[] }>;
            };
        };
    }
    Index
    chat: {
        completions: {
            create(
                args: {
                    model: string;
                    messages: { role: "user" | "system"; content: string }[];
                    response_format?: ExtractionResponseFormat;
                    max_tokens?: number;
                    temperature?: number;
                },
            ): Promise<{ choices: { message: { content: string | null } }[] }>;
        };
    }