mirror of
https://github.com/ivanfioravanti/chatbot-ollama.git
synced 2023-12-01 22:17:38 +03:00
27 lines
448 B
TypeScript
27 lines
448 B
TypeScript
import { OllamaModel } from './ollama';
|
|
|
|
export interface Message {
|
|
role: Role;
|
|
content: string;
|
|
}
|
|
|
|
export type Role = 'assistant' | 'user';
|
|
|
|
export interface ChatBody {
|
|
model: string;
|
|
system: string;
|
|
prompt: string;
|
|
options?:
|
|
{ temperature: number }
|
|
}
|
|
|
|
export interface Conversation {
|
|
id: string;
|
|
name: string;
|
|
messages: Message[];
|
|
model: OllamaModel;
|
|
prompt: string;
|
|
temperature: number;
|
|
folderId: string | null;
|
|
}
|