-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
35 lines (32 loc) · 942 Bytes
/
Copy pathtypes.ts
File metadata and controls
35 lines (32 loc) · 942 Bytes
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
export interface Conversation {
id: string;
name: string;
project_id: string;
user_id: string;
updated_at: string;
}
export interface Message {
role: 'human' | 'ai';
content: string;
}
export interface QueryUsage {
todayQueryCount: number;
remainingQueriesToday: number;
maxQueryAllowancePerDay: number;
nextResetTime: string;
}
export type ApiGetConversationResponse = Conversation | null;
export type ApiGetConversationMessagesResponse = Message[];
export type ApiCreateConversationResponse = Conversation;
export type ApiSendMessageResponse = string;
export type ApiSendMessageStreamedResponse = ReadableStream;
export type ApiGetAllConversationsResponse = Conversation[];
export interface ApiRenameConversationResponse {
title: string;
}
export interface ApiQueryUsageResponse {
today_query_count: number;
remaining_queries_today: number;
max_query_allowance_per_day: number;
next_reset_time: string;
}