on-codemerge
Version:
A WYSIWYG editor for on-codemerge is a user-friendly interface that allows users to edit and view their code in real time, exactly as it will appear in the final product
32 lines (31 loc) • 1.05 kB
TypeScript
export interface DriverOptions {
model: string;
temperature?: number;
maxTokens?: number;
topP?: number;
}
export interface OptionDescription {
type: 'list' | 'number' | 'input' | 'checkbox';
label: string;
options?: string[];
default?: string | number | boolean;
min?: number;
max?: number;
}
export interface OptionsDescription {
[key: string]: OptionDescription;
}
export interface AIDriver<OptionsType> {
/**
* Генерирует текст на основе промта и опций.
* @param prompt - Текст запроса.
* @param options - Параметры для генерации текста.
* @returns Сгенерированный текст.
*/
generateText(prompt: string, options?: OptionsType): Promise<string>;
/**
* Возвращает описание параметров для драйвера.
* @returns Объект с описанием параметров.
*/
getOptionsDescription(): OptionsDescription;
}