mirror of
https://github.com/wassname/stampy-chat.git
synced 2026-09-26 14:20:31 +08:00
38 lines
674 B
TypeScript
38 lines
674 B
TypeScript
export type Citation = {
|
|
title: string;
|
|
authors: string[];
|
|
date: string;
|
|
url: string;
|
|
}
|
|
|
|
export type Followup = {
|
|
text: string;
|
|
pageid: string;
|
|
score: number;
|
|
}
|
|
|
|
export type Entry = UserEntry | AssistantEntry | ErrorMessage | StampyMessage;
|
|
|
|
export type UserEntry = {
|
|
role: "user";
|
|
content: string;
|
|
}
|
|
|
|
export type AssistantEntry = {
|
|
role: "assistant";
|
|
content: string;
|
|
citations: Citation[];
|
|
base_count: number; // the number to start counting citations at
|
|
}
|
|
|
|
export type ErrorMessage = {
|
|
role: "error";
|
|
content: string;
|
|
}
|
|
|
|
export type StampyMessage = {
|
|
role: "stampy";
|
|
content: string;
|
|
url: string;
|
|
}
|