Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
a1b114e4
authored
Mar 06, 2025
by
Archer
Committed by
GitHub
Mar 06, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: qwen qwq model config (#4008)
parent
54fde763
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
37 deletions
+86
-37
docSite/content/zh-cn/docs/development/upgrading/490.md
+1
-0
packages/service/core/ai/config/provider/Qwen.json
+48
-0
packages/service/core/workflow/dispatch/chat/oneapi.ts
+1
-1
projects/app/src/pages/api/core/ai/model/test.ts
+3
-1
projects/app/src/pages/api/core/chat/chatTest.ts
+33
-35
No files found.
docSite/content/zh-cn/docs/development/upgrading/490.md
View file @
a1b114e4
...
...
@@ -173,6 +173,7 @@ curl --location --request POST 'https://{{host}}/api/admin/initv490' \
1.
PDF增强解析交互添加到页面上。同时内嵌 Doc2x 服务,可直接使用 Doc2x 服务解析 PDF 文件。
2.
图片自动标注,同时修改知识库文件上传部分数据逻辑和交互。
3.
pg vector 插件升级 0.8.0 版本,引入迭代搜索,减少部分数据无法被检索的情况。
4.
新增 qwen-qwq 系列模型配置。
## ⚙️ 优化
...
...
packages/service/core/ai/config/provider/Qwen.json
View file @
a1b114e4
...
...
@@ -123,6 +123,54 @@
"showStopSign"
:
true
},
{
"model"
:
"qwq-plus"
,
"name"
:
"qwq-plus"
,
"maxContext"
:
128000
,
"maxResponse"
:
8000
,
"quoteMaxToken"
:
100000
,
"maxTemperature"
:
null
,
"vision"
:
false
,
"toolChoice"
:
true
,
"functionCall"
:
false
,
"defaultSystemChatPrompt"
:
""
,
"datasetProcess"
:
false
,
"usedInClassify"
:
false
,
"customCQPrompt"
:
""
,
"usedInExtractFields"
:
false
,
"usedInQueryExtension"
:
false
,
"customExtractPrompt"
:
""
,
"usedInToolCall"
:
true
,
"defaultConfig"
:
{},
"fieldMap"
:
{},
"type"
:
"llm"
,
"showTopP"
:
false
,
"showStopSign"
:
false
},
{
"model"
:
"qwq-32b"
,
"name"
:
"qwq-32b"
,
"maxContext"
:
128000
,
"maxResponse"
:
8000
,
"quoteMaxToken"
:
100000
,
"maxTemperature"
:
null
,
"vision"
:
false
,
"toolChoice"
:
true
,
"functionCall"
:
false
,
"defaultSystemChatPrompt"
:
""
,
"datasetProcess"
:
false
,
"usedInClassify"
:
false
,
"customCQPrompt"
:
""
,
"usedInExtractFields"
:
false
,
"usedInQueryExtension"
:
false
,
"customExtractPrompt"
:
""
,
"usedInToolCall"
:
true
,
"defaultConfig"
:
{},
"fieldMap"
:
{},
"type"
:
"llm"
,
"showTopP"
:
false
,
"showStopSign"
:
false
},
{
"model"
:
"qwen-coder-turbo"
,
"name"
:
"qwen-coder-turbo"
,
"maxContext"
:
128000
,
...
...
packages/service/core/workflow/dispatch/chat/oneapi.ts
View file @
a1b114e4
...
...
@@ -264,7 +264,7 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise<ChatResp
}
})();
if
(
!
answerText
)
{
if
(
!
answerText
&&
!
reasoningText
)
{
return
Promise
.
reject
(
getEmptyResponseTip
());
}
...
...
projects/app/src/pages/api/core/ai/model/test.ts
View file @
a1b114e4
...
...
@@ -80,8 +80,10 @@ const testLLMModel = async (model: LLMModelItemType) => {
});
const
responseText
=
response
.
choices
?.[
0
]?.
message
?.
content
;
// @ts-ignore
const
reasoning_content
=
response
.
choices
?.[
0
]?.
message
?.
reasoning_content
;
if
(
!
responseText
)
{
if
(
!
responseText
&&
!
reasoning_content
)
{
return
Promise
.
reject
(
'Model response empty'
);
}
...
...
projects/app/src/pages/api/core/chat/chatTest.ts
View file @
a1b114e4
...
...
@@ -204,44 +204,42 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
});
// save chat
if
(
!
res
.
closed
)
{
const
isInteractiveRequest
=
!!
getLastInteractiveValue
(
histories
);
const
{
text
:
userInteractiveVal
}
=
chatValue2RuntimePrompt
(
userQuestion
.
value
);
const
isInteractiveRequest
=
!!
getLastInteractiveValue
(
histories
);
const
{
text
:
userInteractiveVal
}
=
chatValue2RuntimePrompt
(
userQuestion
.
value
);
const
newTitle
=
isPlugin
?
variables
.
cTime
??
getSystemTime
(
timezone
)
:
getChatTitleFromChatMessage
(
userQuestion
);
const
newTitle
=
isPlugin
?
variables
.
cTime
??
getSystemTime
(
timezone
)
:
getChatTitleFromChatMessage
(
userQuestion
);
const
aiResponse
:
AIChatItemType
&
{
dataId
?:
string
}
=
{
dataId
:
responseChatItemId
,
obj
:
ChatRoleEnum
.
AI
,
value
:
assistantResponses
,
[
DispatchNodeResponseKeyEnum
.
nodeResponse
]:
flowResponses
};
const
aiResponse
:
AIChatItemType
&
{
dataId
?:
string
}
=
{
dataId
:
responseChatItemId
,
obj
:
ChatRoleEnum
.
AI
,
value
:
assistantResponses
,
[
DispatchNodeResponseKeyEnum
.
nodeResponse
]:
flowResponses
};
if
(
isInteractiveRequest
)
{
await
updateInteractiveChat
({
chatId
,
appId
:
app
.
_id
,
userInteractiveVal
,
aiResponse
,
newVariables
});
}
else
{
await
saveChat
({
chatId
,
appId
:
app
.
_id
,
teamId
,
tmbId
:
tmbId
,
nodes
,
appChatConfig
:
chatConfig
,
variables
:
newVariables
,
isUpdateUseTime
:
false
,
// owner update use time
newTitle
,
source
:
ChatSourceEnum
.
test
,
content
:
[
userQuestion
,
aiResponse
]
});
}
if
(
isInteractiveRequest
)
{
await
updateInteractiveChat
({
chatId
,
appId
:
app
.
_id
,
userInteractiveVal
,
aiResponse
,
newVariables
});
}
else
{
await
saveChat
({
chatId
,
appId
:
app
.
_id
,
teamId
,
tmbId
:
tmbId
,
nodes
,
appChatConfig
:
chatConfig
,
variables
:
newVariables
,
isUpdateUseTime
:
false
,
// owner update use time
newTitle
,
source
:
ChatSourceEnum
.
test
,
content
:
[
userQuestion
,
aiResponse
]
});
}
createChatUsage
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment