Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ask_data_ai_admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linyangyang
ask_data_ai_admin
Commits
85a587a8
Commit
85a587a8
authored
Jul 22, 2025
by
林洋洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改模型,修改流返回
parent
39155e13
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
ChatController.java
...-biz/src/main/java/com/ask/controller/ChatController.java
+5
-5
ConvertUtils.java
...data-ai-biz/src/main/java/com/ask/utils/ConvertUtils.java
+1
-0
application.yml
...ta-ai/ask-data-ai-boot/src/main/resources/application.yml
+1
-1
No files found.
ask-data-ai/ask-data-ai-biz/src/main/java/com/ask/controller/ChatController.java
View file @
85a587a8
...
...
@@ -161,20 +161,20 @@ public class ChatController {
}
@Operation
(
summary
=
"智能数据报表对话"
,
description
=
"智能数据报表对话"
)
@GetMapping
(
value
=
"/chat/report"
)
public
String
reportChat
(
@RequestParam
String
message
,
@GetMapping
(
value
=
"/chat/report"
,
produces
=
MediaType
.
TEXT_EVENT_STREAM_VALUE
)
public
Flux
<
String
>
reportChat
(
@RequestParam
String
message
,
@RequestParam
String
conversationId
)
{
Message
systemMessage
=
new
SystemMessage
(
"你是一个AI问答助手,请用回答用户问题,使用相关工具"
);
Message
userMessage
=
new
UserMessage
(
message
);
Prompt
prompt
=
new
Prompt
(
List
.
of
(
systemMessage
,
userMessage
));
return
openAi
ChatClient
.
prompt
(
prompt
)
return
FluxUtils
.
wrapDeepSeekStream
(
deepseek
ChatClient
.
prompt
(
prompt
)
.
advisors
(
messageChatMemoryAdvisor
)
.
advisors
(
a
->
a
.
param
(
ChatMemory
.
CONVERSATION_ID
,
conversationId
))
.
tools
(
excelTools
)
.
call
()
.
c
ontent
(
);
.
stream
()
.
c
hatResponse
()
);
}
}
\ No newline at end of file
ask-data-ai/ask-data-ai-biz/src/main/java/com/ask/utils/ConvertUtils.java
View file @
85a587a8
...
...
@@ -57,6 +57,7 @@ public class ConvertUtils {
log
.
error
(
"文档生成或上传失败: {}"
,
e
.
getMessage
(),
e
);
return
false
;
}
catch
(
Exception
e
)
{
log
.
error
(
"文档生成或上传失败: {}"
,
e
.
getMessage
(),
e
);
return
false
;
}
return
true
;
...
...
ask-data-ai/ask-data-ai-boot/src/main/resources/application.yml
View file @
85a587a8
...
...
@@ -49,7 +49,7 @@ spring:
chat
:
enabled
:
true
options
:
model
:
deepseek-r1-
distill-llama-70b
model
:
deepseek-r1-
0528
mybatis-plus
:
mapper-locations
:
classpath*:/mapper/*Mapper.xml
# mapper文件位置
...
...
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