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
39155e13
Commit
39155e13
authored
Jul 22, 2025
by
林洋洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加baseURL
parent
61d89fa9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
ChatController.java
...-biz/src/main/java/com/ask/controller/ChatController.java
+1
-1
ChatService.java
...i-biz/src/main/java/com/ask/service/impl/ChatService.java
+3
-1
ExcelTools.java
...k-data-ai-biz/src/main/java/com/ask/tools/ExcelTools.java
+5
-1
application.yml
...ta-ai/ask-data-ai-boot/src/main/resources/application.yml
+2
-1
No files found.
ask-data-ai/ask-data-ai-biz/src/main/java/com/ask/controller/ChatController.java
View file @
39155e13
...
...
@@ -166,7 +166,7 @@ public class ChatController {
@RequestParam
String
conversationId
)
{
Message
systemMessage
=
new
SystemMessage
(
"你是一个AI问答助手,请用回答用户问题,使用相关工具"
);
Message
userMessage
=
new
UserMessage
(
"问题:"
+
message
+
"\n回答要求:请使用markdown格式输出"
);
Message
userMessage
=
new
UserMessage
(
message
);
Prompt
prompt
=
new
Prompt
(
List
.
of
(
systemMessage
,
userMessage
));
return
openAiChatClient
.
prompt
(
prompt
)
...
...
ask-data-ai/ask-data-ai-biz/src/main/java/com/ask/service/impl/ChatService.java
View file @
39155e13
...
...
@@ -12,6 +12,7 @@ import org.springframework.ai.document.Document;
import
org.springframework.ai.vectorstore.SearchRequest
;
import
org.springframework.ai.vectorstore.VectorStore
;
import
org.springframework.ai.vectorstore.filter.Filter
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -35,7 +36,8 @@ public class ChatService {
private
final
VectorStore
vectorStore
;
private
final
ChatMemory
chatMemory
;
@Value
(
"${file.local.base-url:http://8.152.98.45/api}"
)
private
String
baseUrl
;
/**
* rag召回
*
...
...
ask-data-ai/ask-data-ai-biz/src/main/java/com/ask/tools/ExcelTools.java
View file @
39155e13
...
...
@@ -5,6 +5,7 @@ import com.ask.utils.ConvertUtils;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.ai.tool.annotation.Tool
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.i18n.LocaleContextHolder
;
import
org.springframework.stereotype.Component
;
...
...
@@ -26,6 +27,9 @@ public class ExcelTools {
@Autowired
private
ConvertUtils
convertUtils
;
@Value
(
"${file.local.base-url:http://8.152.98.45/api}"
)
private
String
baseUrl
;
private
String
formatLocalDate
(
LocalDate
date
)
{
// 创建自定义格式器:2位年份.单/双位月.单/双位日
DateTimeFormatter
formatter
=
new
DateTimeFormatterBuilder
()
...
...
@@ -61,7 +65,7 @@ public class ExcelTools {
if
(
result
){
jsonObject
.
set
(
"success"
,
true
);
jsonObject
.
set
(
"fileName"
,
fileName
);
jsonObject
.
set
(
"filePath"
,
"/admin/sys-file/"
+
bucketName
+
"/"
+
fileName
);
jsonObject
.
set
(
"filePath"
,
baseUrl
+
"/admin/sys-file/"
+
bucketName
+
"/"
+
fileName
);
}
else
{
jsonObject
.
set
(
"success"
,
false
);
jsonObject
.
set
(
"fileName"
,
""
);
...
...
ask-data-ai/ask-data-ai-boot/src/main/resources/application.yml
View file @
39155e13
...
...
@@ -49,7 +49,7 @@ spring:
chat
:
enabled
:
true
options
:
model
:
deepseek-r1
model
:
deepseek-r1
-distill-llama-70b
mybatis-plus
:
mapper-locations
:
classpath*:/mapper/*Mapper.xml
# mapper文件位置
...
...
@@ -138,3 +138,4 @@ file:
local
:
enable
:
true
base-path
:
/app/upFiles
base-url
:
http://8.152.98.45/api
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