Spaces:
No application file
No application file
Upload chat.ts
Browse files
chat.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export type AIProvider = "openai" | "openrouter" | "groq" | "grok"
|
| 2 |
+
|
| 3 |
+
export interface Message {
|
| 4 |
+
id: string
|
| 5 |
+
role: "user" | "assistant"
|
| 6 |
+
content: string
|
| 7 |
+
provider?: AIProvider
|
| 8 |
+
timestamp: Date
|
| 9 |
+
file?: {
|
| 10 |
+
name: string
|
| 11 |
+
type: string
|
| 12 |
+
content: string
|
| 13 |
+
}
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
export interface ChatSession {
|
| 17 |
+
id: string
|
| 18 |
+
title: string
|
| 19 |
+
messages: Message[]
|
| 20 |
+
createdAt: Date
|
| 21 |
+
updatedAt: Date
|
| 22 |
+
}
|