29 lines
713 B
TypeScript
29 lines
713 B
TypeScript
import { Message } from 'discord.js';
|
|
import { LLMConfig } from '../commands/types';
|
|
|
|
export interface StreamingChunk {
|
|
reasoning?: string;
|
|
content?: string;
|
|
done?: boolean;
|
|
}
|
|
|
|
export interface LLMProvider {
|
|
name(): string;
|
|
requestLLMResponse(history: Message[], sysprompt: string, params: LLMConfig): Promise<string>;
|
|
requestLLMResponseStreaming?(
|
|
history: Message[],
|
|
sysprompt: string,
|
|
params: LLMConfig
|
|
): AsyncGenerator<StreamingChunk, string, unknown>;
|
|
setModel(id: string): void;
|
|
}
|
|
|
|
export interface LLMDiscordMessage {
|
|
timestamp: string;
|
|
author: string;
|
|
name?: string;
|
|
context?: string;
|
|
content: string;
|
|
reactions?: string;
|
|
}
|