Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-bi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-bi
Commits
0fe0e170
提交
0fe0e170
authored
4月 23, 2025
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
86f4f9e4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
15 行增加
和
11 行删除
+15
-11
App.scss
src/App.scss
+6
-1
AIChat.tsx
src/ai/AIChat.tsx
+1
-1
config.ts
src/ai/config.ts
+5
-5
useAI.ts
src/ai/useAI.ts
+3
-4
没有找到文件。
src/App.scss
浏览文件 @
0fe0e170
...
...
@@ -68,5 +68,10 @@ body,
.ai-thinking
{
margin-bottom
:
20px
;
padding-left
:
16px
;
border-left
:
1px
solid
rgba
(
0
,
0
,
0
,
0
.45
);
border-left
:
2px
solid
#e5e5e5
;
color
:
#8b8b8b
;
line-height
:
26px
;
&
:empty
{
display
:
none
;
}
}
src/ai/AIChat.tsx
浏览文件 @
0fe0e170
...
...
@@ -58,7 +58,7 @@ export default function AIChat() {
onChange=
{
setAI
}
variant=
"filled"
suffixIcon=
{
null
}
popupMatchSelectWidth=
{
21
0
}
></
Select
>
popupMatchSelectWidth=
{
14
0
}
></
Select
>
<
Button
type=
"primary"
shape=
"circle"
icon=
{
<
ArrowUpOutlined
/>
}
onClick=
{
handleAI
}
loading=
{
isLoading
}
/>
</
div
>
<
div
className=
"upload-list"
></
div
>
...
...
src/ai/config.ts
浏览文件 @
0fe0e170
...
...
@@ -3,11 +3,11 @@ import { AIOption } from './types'
export
const
AI_OPTIONS
:
AIOption
[]
=
[
{
label
:
'DeepSeek-R1'
,
value
:
'Pro/deepseek-ai/DeepSeek-R1'
},
{
label
:
'DeepSeek-V3'
,
value
:
'Pro/deepseek-ai/DeepSeek-V3'
},
{
label
:
'
QwQ-32B
'
,
value
:
'Qwen/QwQ-32B'
},
{
label
:
'
deepseek-r1-250120'
,
value
:
'deepseek-r1-250120
'
},
{
label
:
'
doubao-pro-32k-241215'
,
value
:
'doubao-pro-32k-241215
'
},
{
label
:
'
qwen-max-latest'
,
value
:
'qwen-max-latest
'
},
{
label
:
'qwen-long'
,
value
:
'qwen-long
'
},
{
label
:
'
通义千问-QwQ
'
,
value
:
'Qwen/QwQ-32B'
},
{
label
:
'
通义千问-Max'
,
value
:
'qwen-max-latest
'
},
{
label
:
'
通义千问-Long'
,
value
:
'qwen-long
'
},
{
label
:
'
豆包-Pro'
,
value
:
'doubao-pro-32k-241215
'
},
// { label: 'deepseek-r1-250120', value: 'deepseek-r1-250120
' },
// { label: 'hunyuan-t1-latest', value: 'hunyuan-t1-latest' },
// { label: 'hunyuan-standard-256K', value: 'hunyuan-standard-256K' },
]
src/ai/useAI.ts
浏览文件 @
0fe0e170
...
...
@@ -3,17 +3,16 @@ import { AI_OPTIONS } from './config'
import
aiService
from
'./api'
import
type
{
AIMessage
,
AIRequestData
,
GenerateImageRequestData
,
GenerateVideoRequestData
}
from
'./types'
import
{
RequestOptions
}
from
'./request'
import
{
useAIStore
}
from
'./useAIStore'
export
function
useAI
(
globalOptions
?:
RequestOptions
)
{
const
[
ai
,
setAI
]
=
useState
<
string
>
(
localStorage
.
getItem
(
'ai'
)
||
'Pro/deepseek-ai/DeepSeek-R1'
)
const
ai
=
useAIStore
((
state
)
=>
state
.
ai
)
const
setAI
=
useAIStore
((
state
)
=>
state
.
setAI
)
const
[
messages
,
setMessages
]
=
useState
<
AIMessage
[]
>
([])
const
[
message
,
setMessage
]
=
useState
<
AIMessage
|
null
>
(
null
)
const
[
isLoading
,
setIsLoading
]
=
useState
<
boolean
>
(
false
)
const
[
error
,
setError
]
=
useState
<
string
|
null
>
(
null
)
const
controllerRef
=
useRef
<
AbortController
|
null
>
(
null
)
useEffect
(()
=>
{
localStorage
.
setItem
(
'ai'
,
ai
)
},
[
ai
])
const
clearError
=
useCallback
(()
=>
{
setError
(
null
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论