Spaces:
Running
Running
File size: 748 Bytes
0c4cf03 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
import type { ObjectId } from "mongodb";
import type { Conversation } from "./Conversation";
import type { Timestamps } from "./Timestamps";
export interface WebSearch extends Timestamps {
_id: ObjectId;
convId: Conversation["_id"];
prompt: string;
searchQuery: string;
results: string[];
knowledgeGraph: string;
summary: string;
messages: WebSearchMessage[];
}
export type WebSearchMessageUpdate = {
type: "update";
message: string;
args?: string[];
};
export type WebSearchMessageError = {
type: "error";
message: string;
args?: string[];
};
export type WebSearchMessageResult = {
type: "result";
id: string;
};
export type WebSearchMessage =
| WebSearchMessageUpdate
| WebSearchMessageResult
| WebSearchMessageError;
|