open-ai-npc
Version:
Testing openAI's API, with a "dungeon master".
17 lines (16 loc) • 605 B
TypeScript
import type { ChatCompletionCreateParamsBase } from "openai/resources/chat/completions.mjs";
import OpenAI from "openai";
import type { Express } from "express";
export declare class DetectiveManager {
openai: OpenAI;
constructor(clientOptions?: {
apiKey: string | undefined;
organization: string | undefined;
project: string | undefined;
});
initialized: boolean;
answer(sentence: string, previous: string | undefined, params?: Partial<ChatCompletionCreateParamsBase>): Promise<{
content: string | null;
}>;
addDetective(app: Express): void;
}