ai-switcher
Version:
A package which helps you switch between AI APIs using configurations, so that code changes are not required.
10 lines (9 loc) • 379 B
TypeScript
import { Message, CompletionOptions } from '../types';
import { BaseAIClient } from './base';
export declare class OpenAIClient extends BaseAIClient {
private client;
protected apiKey: string;
constructor(apiKey: string);
createCompletion(messages: Message[], options?: CompletionOptions): Promise<string>;
createEmbedding(text: string): Promise<number[]>;
}