|
|
преди 3 седмици | |
|---|---|---|
| app | преди 3 седмици | |
| public | преди 3 месеца | |
| src-tauri | преди 1 година | |
| .babelrc | преди 1 година | |
| .gitignore | преди 3 месеца | |
| ALIBABA_VL_INTEGRATION.md | преди 3 месеца | |
| README.md | преди 1 месец | |
| next.config.mjs | преди 3 седмици | |
| package-lock.json | преди 3 месеца | |
| package.json | преди 3 месеца | |
| tsconfig.json | преди 1 година |
┌───────────────────────────────────────────────┐
│ UI层 │
│ ┌─────────────┐ ┌─────────────┐ ┌────────┐ │
│ │ 聊天组件 │ │ 设置面板 │ │ 导出 │ │
│ └─────────────┘ └─────────────┘ └────────┘ │
├───────────────────────────────────────────────┤
│ 状态管理层 │
│ ┌─────────────────────────────────────────┐ │
│ │ Zustand Store │ │
│ │ ┌────────┐ ┌────────┐ ┌──────────────┐ │ │
│ │ │ 聊天状态│ │ 配置状态│ │ 全局状态 │ │ │
│ │ └────────┘ └────────┘ └──────────────┘ │ │
│ └─────────────────────────────────────────┘ │
├───────────────────────────────────────────────┤
│ 服务层 │
│ ┌─────────────────────────────────────────┐ │
│ │ API代理层 │ │
│ │ ┌───────┐ ┌───────┐ ┌────────────────┐ │ │
│ │ │阿里云 │ │OpenAI │ │ 自定义大模型 │ │ │
│ │ └───────┘ └───────┘ └────────────────┘ │ │
│ └─────────────────────────────────────────┘ │
└───────────────────────────────────────────────┘
classDiagram
class ChatSession {
+String id
+String topic
+ChatMessage[] messages
+ChatStat stat
+Mask mask
+Date lastUpdate
}
class ChatMessage {
+String id
+String role
+String content
+Date date
+Boolean streaming
+String model
}
class Mask {
+String name
+String avatar
+ModelConfig modelConfig
+String[] context
}
ChatSession "1" *-- "many" ChatMessage
ChatSession "1" -- "1" Mask
sequenceDiagram
participant 用户
participant UI组件
participant 状态管理
participant API服务
用户->>UI组件: 输入问题
UI组件->>状态管理: 更新输入状态
用户->>UI组件: 提交问题
UI组件->>API服务: 发送请求
API服务->>状态管理: 流式返回响应
状态管理->>UI组件: 实时更新消息
UI组件->>用户: 显示AI回复
状态管理->>状态管理: 自动生成会话摘要
http://localhost:4000/#/knowledgeChat?showMenu=true&chatMode=LOCAL&appId=2924812721300312064 http://localhost:4000/#/knowledgeChat?showMenu=false&chatMode=LOCAL&appId=2924812721300312064
常改文件---components/chat.tsx--->对应的是智普问答 常改文件---components/DeepSeekChat.tsx--->对应的是deepSeek问答
本地调试需要改变文件 1、app/client/platforms/deepSeek.ts
this.apiPath = this.baseURL + '/vllm/ai/chat';//线上地址
this.apiPath = this.baseURL + '/vllm/chat'; // 测试地址
2、 destination: "http://xia0miduo.gicp.net:8401/:path*",----这一步可以改也可以不改
// destination: "http://xia0miduo.gicp.net:8401/:path*",
destination: "http://192.168.3.123:8091/:path*",
3、app/components/home.tsx
toUninLogin方法下增加 return 禁止跳转到首页
如下:
const toUninLogin = async (originUrl:string, fullUrl:string) => {
// return ----- 这里
//测试环境
//const loginUrl = 'https://esctest.sribs.com.cn/esc-sso/oauth2.0/authorize?client_id=e97f94cf93761f4d69e8&response_type=code';
//生产环境
const loginUrl = 'http://esc.sribs.com.cn:8080/esc-sso/oauth2.0/authorize?client_id=e97f94cf93761f4d69e8&response_type=code';
const externalLoginUrl = loginUrl + `&redirect_uri=${encodeURIComponent(originUrl)}&state=${encodeURIComponent(fullUrl)}`;
location.replace(externalLoginUrl);
} # 分支对应项目 app-permission --- 目前线上 dev/app dev/second master plusSingle --- 招聘 single