mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-07-26 16:24:39 +00:00

* feat: locale language * refactor: 页面暂存 * feat: 逻辑判断 * feat: 分组消息 * feat: 实验场 * feat: 重新请求结果 * feat: 基础问答逻辑和重新询问 * feat: 上下文消息删除确认 * feat: 处理类型报错 * chore: 更新 deps 和移除 i18n * feat: 路由页面切换终止请求 * feat: let me think * feat: 信息更新代码高亮匹配 * feat: 加载时添加光标 * feat: 错误提示 * feat: 历史记录删除确认 * fix: 侧边栏高度不正确的问题 * chore: version 2.5.0 * chore: update deps
46 lines
931 B
TypeScript
46 lines
931 B
TypeScript
declare namespace Chat {
|
|
|
|
interface Chat {
|
|
dateTime: string
|
|
text: string
|
|
inversion?: boolean
|
|
error?: boolean
|
|
loading?: boolean
|
|
conversationOptions?: ConversationRequest | null
|
|
requestOptions: { prompt: string; options?: ConversationRequest | null }
|
|
}
|
|
|
|
interface History {
|
|
title: string
|
|
isEdit: boolean
|
|
uuid: number
|
|
}
|
|
|
|
interface ChatState {
|
|
active: number | null
|
|
history: History[]
|
|
chat: { uuid: number; data: Chat[] }[]
|
|
}
|
|
|
|
interface ConversationRequest {
|
|
conversationId?: string
|
|
parentMessageId?: string
|
|
}
|
|
|
|
interface ConversationResponse {
|
|
conversationId: string
|
|
detail: {
|
|
choices: { finish_reason: string; index: number; logprobs: any; text: string }[]
|
|
created: number
|
|
id: string
|
|
model: string
|
|
object: string
|
|
usage: { completion_tokens: number; prompt_tokens: number; total_tokens: number }
|
|
}
|
|
id: string
|
|
parentMessageId: string
|
|
role: string
|
|
text: string
|
|
}
|
|
}
|