Skip to content

Commit 8f192e9

Browse files
committed
fix:修正模型导入异常;修正点击对话历史记录在对话主页面模型类型切换后悬浮按钮位置未更新;doc:更新readme和changelog;添加了自用各个平台的模型规格文件.
1 parent 8388496 commit 8f192e9

19 files changed

+1085
-67
lines changed

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
一些较大变更、新功能、bug 修复等记录放在此处,仅做参看的提交更新.
44

5+
## 0.4.1-beta.1
6+
7+
- refactor:
8+
- 全面移除了第一版“AI 智能助手”的所有功能代码,并简单调整了项目文件夹结构
9+
- feat:
10+
- 添加了应用签名
11+
- 支持了 DeepSeek 官方平台的 api
12+
- 模型选择弹窗添加关键词筛选
13+
- 自定义导入的模型列表可点击标题排序(默认是导入创建时间降序)
14+
- fix:
15+
- 修正不同云平台简单流式响应的处理可能会报错
16+
- "开启新对话"和滚动到底部按钮从输入框组件拆出,改在对话主页面悬浮
17+
18+
**注意**,因为有测试添加了应用签名,所以需要卸载重装:
19+
20+
- `0.4.0-beta.1`可以全量备份数据后重新覆盖恢复;更早的版本请当作全新应用使用。
21+
522
## 0.4.0-beta.1
623

724
- refactor:

README.md

+36-8
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ Smart Work&Life Mate
44

55
使用 flutter 开发的一个“智能工作生活类助手”应用。主要包含:
66

7-
- 以调用各个云平台部署的在线大模型 API 为基底的“**AI 智能助手**”,(简称“工具”)。
8-
- 2025-02-26 大模型 API 调用**只保留其 HTTP API 兼容 openAI API 结构的**平台和模型,不再兼容其他平台自己定义的 API 结构,具体如下:
7+
- 以简单参数调用各个云平台部署的在线大模型 API 为基底的“**AI 智能助手**”,(简称“工具”)。
8+
- 2025-03-04 大模型 API 调用**只保留其 HTTP API 兼容 openAI API 结构的**平台和模型,不再兼容其他平台自己定义的 API 结构,具体如下:
99
- 对话模型:
1010
- [阿里](https://help.aliyun.com/zh/model-studio/developer-reference/compatibility-of-openai-with-dashscope)
1111
- [百度](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Fm2vrveyu)
1212
- [腾讯](https://console.cloud.tencent.com/hunyuan/start)
1313
- [智谱](https://open.bigmodel.cn/dev/api/normal-model/glm-4)
14-
- [深度求索](https://api-docs.deepseek.com/zh-cn/)
14+
- [深度求索(DeepSeek)](https://api-docs.deepseek.com/zh-cn/)
1515
- [零一万物](https://platform.lingyiwanwu.com/docs/api-reference)
1616
- [无问芯穹](https://docs.infini-ai.com/gen-studio/api/maas.html#/operations/chatCompletions)
1717
- [硅基流动](https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions)
@@ -66,7 +66,7 @@ AI 助手,就是调用各个平台中的语言大模型 API,进行聊天、
6666
- 实际实现是先调用讯飞的语音转写 API,把语音转为了文字,再调用大模型的 API
6767
- 直接发送语音就直接是转化后的文字,有可能会识别错,可以在页面中查看转化后的文本,发送文本
6868
- 有保存原语音文件在设备本地应用缓存,所以点击可以听原语音
69-
- 可以查看最近的对话,点击指定对话历史记录,可以继续交流
69+
- 可以查看最近的对话(点击对话主页面右上角的历史记录图标),点击指定对话历史记录,可以继续交流
7070
- 历史记录是存在设备本地的 sqlite 数据库中的
7171
- 如果平台有 DeepSeek R 系列深度思考(默认的)功能,返回中有`reasoning_content`字段,会显示在对话框中当作思考内容。
7272

@@ -102,7 +102,11 @@ AI 绘图/视频结构和操作类似,所以放在一起说。
102102
- 如果想使用本应用支持的平台中更加强劲的模型,可自行去各个平台充值、获取密钥,再导入密钥和模型 json 文件
103103
- **密钥只缓存在本地,事实上,除了调用 API 和加载图片、视频,都没有联网操作**
104104
- 想用哪个平台、哪个模型,全都自己导入
105-
- 平台密钥和模型规格的**固定 json 结构**如下:
105+
- 平台密钥和模型规格的**固定 json 结构**见下方
106+
107+
---
108+
109+
**_注意,平台密钥和平台模型规格要同时导入,否则无法正常使用。_**
106110

107111
#### 平台密钥 json 结构
108112

@@ -182,14 +186,16 @@ AI 绘图/视频结构和操作类似,所以放在一起说。
182186

183187
```ts
184188
enum ApiPlatform {
189+
aliyun, // 阿里云百炼
185190
baidu, // 百度千帆
186191
tencent, // 腾讯混元
187-
aliyun, // 阿里云百炼
188-
siliconCloud, // 硅基流动
192+
193+
deepseek, // 深度求索
189194
lingyiwanwu, // 零一万物
190195
zhipu, // 智谱 AI
196+
197+
siliconCloud, // 硅基流动
191198
infini, // 无问芯穹的 genStudio
192-
deepseek, // 深度求索
193199
}
194200
```
195201

@@ -210,6 +216,22 @@ enum LLModelType {
210216

211217
后续我会放一些整理好的各个平台我常用的大模型规格 json 文件在项目的 **[\_cus_model_jsons](./_cus_model_jsons)** 文件夹中,可以参考使用。
212218

219+
### TODO
220+
221+
2025-03-04 时想到的:
222+
223+
- [ ] AI 工具部分:
224+
- [ ] 高级请求参数配置(temperature、max_tokens 等比较常用但暂没支持用户配置)
225+
- [ ] 对话消息展示的 Markdown 格式结合 LaTeX
226+
- [ ] AI 助手可编辑某个输入对话的消息,并记录对话分支
227+
- [ ] 添加角色卡功能,可少量预设,支持用户自行导入
228+
- [ ] 一键保存整个对话为 Markdown 文件?
229+
- [ ] 多 Agent 的群聊、角色扮演?
230+
- [ ] 免费云端数据库用于数据存储?
231+
- [ ] 是否简单使用 Nodejs 编写一个后端?
232+
- [ ] 生活工具部分:
233+
- [ ] 一个简单的文本记事本(ToDo)?
234+
213235
## 生活日常工具
214236

215237
![生活工具](./_doc/screenshots/brief_version/生活工具.jpg)
@@ -305,6 +327,12 @@ _这个其实是之前(2024-04-09)就单独开发好的 app 了,功能融合
305327

306328
因为智能助手的对话记录、极简记账的账单条目、随机菜品的菜品列表等,都是本地 sqlite 存储的,所以备份就是把 db 中的数据导出成 json 文件并压缩,恢复就是把压缩包的 json 存入数据库中。
307329

330+
**注意**
331+
332+
- 恢复会清空当前数据库中的数据,请谨慎操作。
333+
- 更新或卸载前,推荐先全量备份。
334+
- 0.4.0 之前的版本数据库表结构和现在不一样,所以不能恢复。
335+
308336
# 其他说明
309337

310338
## 开发环境
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
[
2+
{
3+
"platform": "infini",
4+
"model": "deepseek-r1",
5+
"modelType": "cc",
6+
"name": "deepseek-r1",
7+
"contextLength": 64000,
8+
"isFree": false,
9+
"inputPrice": 4,
10+
"outputPrice": 16,
11+
"gmtRelease": "2025-02-06"
12+
},
13+
{
14+
"platform": "infini",
15+
"model": "deepseek-v3",
16+
"modelType": "cc",
17+
"name": "deepseek-v3",
18+
"contextLength": 64000,
19+
"isFree": false,
20+
"inputPrice": 2,
21+
"outputPrice": 8,
22+
"gmtRelease": "2025-02-07"
23+
},
24+
{
25+
"platform": "lingyiwanwu",
26+
"model": "deepseek-r1-distill-qwen-32b",
27+
"modelType": "cc",
28+
"name": "deepseek-r1-distill-qwen-32b",
29+
"contextLength": 32000,
30+
"isFree": false,
31+
"inputPrice": 0,
32+
"outputPrice": 0,
33+
"gmtRelease": "2025-01-21"
34+
},
35+
{
36+
"platform": "infini",
37+
"model": "qwq-32b-preview",
38+
"modelType": "cc",
39+
"name": "qwq-32b-preview",
40+
"contextLength": 32,
41+
"isFree": false,
42+
"inputPrice": 0,
43+
"outputPrice": 0,
44+
"gmtRelease": "2024-12-02"
45+
},
46+
{
47+
"platform": "infini",
48+
"model": "qwen2.5-72b-instruct",
49+
"modelType": "cc",
50+
"name": "qwen2.5-72b-instruct",
51+
"contextLength": 32000,
52+
"isFree": false,
53+
"inputPrice": 0,
54+
"outputPrice": 0,
55+
"gmtRelease": "2024-09-19"
56+
},
57+
{
58+
"platform": "infini",
59+
"model": "qwen2.5-32b-instruct",
60+
"modelType": "cc",
61+
"name": "qwen2.5-32b-instruct",
62+
"contextLength": 32000,
63+
"isFree": false,
64+
"inputPrice": 0,
65+
"outputPrice": 0,
66+
"gmtRelease": "2024-09-20"
67+
},
68+
{
69+
"platform": "infini",
70+
"model": "qwen2.5-14b-instruct",
71+
"modelType": "cc",
72+
"name": "qwen2.5-14b-instruct",
73+
"contextLength": 32000,
74+
"isFree": false,
75+
"inputPrice": 0,
76+
"outputPrice": 0,
77+
"gmtRelease": "2024-09-20"
78+
},
79+
{
80+
"platform": "infini",
81+
"model": "qwen2-72b-instruct",
82+
"modelType": "cc",
83+
"name": "qwen2-72b-instruct",
84+
"contextLength": 32000,
85+
"isFree": false,
86+
"inputPrice": 0,
87+
"outputPrice": 0,
88+
"gmtRelease": "2024-06-12"
89+
}
90+
]

_cus_model_jsons/model_智谱.json

+136
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
[
2+
{
3+
"platform": "zhipu",
4+
"model": "glm-4-plus",
5+
"modelType": "cc",
6+
"name": "GLM-4-Plus",
7+
"contextLength": 128000,
8+
"isFree": false,
9+
"inputPrice": 50,
10+
"outputPrice": 50,
11+
"gmtRelease": "1970-01-01"
12+
},
13+
{
14+
"platform": "zhipu",
15+
"model": "glm-4-air",
16+
"modelType": "cc",
17+
"name": "GLM-4-Air",
18+
"contextLength": 128000,
19+
"isFree": false,
20+
"inputPrice": 0.5,
21+
"outputPrice": 0.5,
22+
"gmtRelease": "1970-01-01"
23+
},
24+
{
25+
"platform": "zhipu",
26+
"model": "glm-4-long",
27+
"modelType": "cc",
28+
"name": "GLM-4-Long",
29+
"contextLength": 1000000,
30+
"isFree": false,
31+
"inputPrice": 1,
32+
"outputPrice": 1,
33+
"gmtRelease": "1970-01-01"
34+
},
35+
{
36+
"platform": "zhipu",
37+
"model": "glm-zero-preview",
38+
"modelType": "cc",
39+
"name": "GLM-Zero-Preview",
40+
"contextLength": 16000,
41+
"isFree": false,
42+
"inputPrice": 10,
43+
"outputPrice": 10,
44+
"gmtRelease": "1970-01-01"
45+
},
46+
{
47+
"platform": "zhipu",
48+
"model": "glm-4-airx",
49+
"modelType": "cc",
50+
"name": "GLM-4-AirX",
51+
"contextLength": 8000,
52+
"isFree": false,
53+
"inputPrice": 10,
54+
"outputPrice": 10,
55+
"gmtRelease": "1970-01-01"
56+
},
57+
{
58+
"platform": "zhipu",
59+
"model": "glm-4-flashx",
60+
"modelType": "cc",
61+
"name": "GLM-4-FlashX",
62+
"contextLength": 128000,
63+
"isFree": false,
64+
"inputPrice": 0.1,
65+
"outputPrice": 0.1,
66+
"gmtRelease": "1970-01-01"
67+
},
68+
{
69+
"platform": "zhipu",
70+
"model": "glm-4v-plus-0111",
71+
"modelType": "vision",
72+
"name": "GLM-4V-Plus-0111",
73+
"contextLength": 8000,
74+
"isFree": false,
75+
"inputPrice": 4,
76+
"outputPrice": 4,
77+
"gmtRelease": "1970-01-01"
78+
},
79+
{
80+
"platform": "zhipu",
81+
"model": "cogview-4",
82+
"modelType": "image",
83+
"name": "CogView-4",
84+
"isFree": false,
85+
"costPer": 0.06,
86+
"gmtRelease": "1970-01-01"
87+
},
88+
{
89+
"platform": "zhipu",
90+
"model": "cogvideox-2",
91+
"modelType": "video",
92+
"name": "CogVideoX-2",
93+
"isFree": false,
94+
"costPer": 0.5,
95+
"gmtRelease": "1970-01-01"
96+
},
97+
98+
{
99+
"platform": "zhipu",
100+
"model": "glm-4-flash",
101+
"modelType": "cc",
102+
"name": "CGLM-4-Flash",
103+
"isFree": true,
104+
"inputPrice": 0.0,
105+
"outputPrice": 0.0,
106+
"gmtRelease": "1970-01-01"
107+
},
108+
{
109+
"platform": "zhipu",
110+
"model": "glm-4v-flash",
111+
"modelType": "vision",
112+
"name": "GLM-4V-Flash",
113+
"isFree": true,
114+
"inputPrice": 0.0,
115+
"outputPrice": 0.0,
116+
"gmtRelease": "1970-01-01"
117+
},
118+
{
119+
"platform": "zhipu",
120+
"model": "cogview-3-flash",
121+
"modelType": "image",
122+
"name": "CogView-3-Flash",
123+
"isFree": true,
124+
"costPer": 0.0,
125+
"gmtRelease": "1970-01-01"
126+
},
127+
{
128+
"platform": "zhipu",
129+
"model": "ccogvideox-flash",
130+
"modelType": "video",
131+
"name": "CogVideoX-Flash",
132+
"isFree": true,
133+
"costPer": 0.0,
134+
"gmtRelease": "1970-01-01"
135+
}
136+
]
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[
2+
{
3+
"platform": "deepseek",
4+
"model": "deepseek-chat",
5+
"modelType": "cc",
6+
"name": "DeepSeek-V3",
7+
"contextLength": 64000,
8+
"isFree": false,
9+
"inputPrice": 2,
10+
"outputPrice": 8,
11+
"gmtRelease": "2024-12-26"
12+
},
13+
{
14+
"platform": "deepseek",
15+
"model": "deepseek-reasoner",
16+
"modelType": "cc",
17+
"name": "DeepSeek-R1",
18+
"contextLength": 64000,
19+
"isFree": false,
20+
"inputPrice": 4,
21+
"outputPrice": 16,
22+
"gmtRelease": "2025-01-20"
23+
}
24+
]

0 commit comments

Comments
 (0)