Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Shucai Chen
/
lufa-ai
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
Commit
2ef508ae
authored
Sep 17, 2025
by
patrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 解决流式响应超过256k大小
parent
54c3ab7b
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
9 additions
and
3 deletions
+9
-3
.DS_Store
+0
-0
jpai_deploy/.DS_Store
+0
-0
ruoyi-vue-pro-master-jdk17/.DS_Store
+0
-0
ruoyi-vue-pro-master-jdk17/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java
+2
-1
ruoyi-vue-pro-master-jdk17/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/fastgpt/FastGPTApi.java
+1
-1
ruoyi-vue-pro-master-jdk17/yudao-server/.DS_Store
+0
-0
ruoyi-vue-pro-master-jdk17/yudao-server/src/main/resources/application-dev.yaml
+4
-0
ruoyi-vue-pro-master-jdk17/yudao-server/src/main/resources/application-local.yaml
+0
-0
ruoyi-vue-pro-master-jdk17/yudao-server/src/main/resources/application.yaml
+0
-1
yudao-ui-admin-vue3/src/types/auto-components.d.ts
+2
-0
No files found.
.DS_Store
View file @
2ef508ae
No preview for this file type
jpai_deploy/.DS_Store
View file @
2ef508ae
No preview for this file type
ruoyi-vue-pro-master-jdk17/.DS_Store
View file @
2ef508ae
No preview for this file type
ruoyi-vue-pro-master-jdk17/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatMessageServiceImpl.java
View file @
2ef508ae
...
@@ -41,6 +41,7 @@ import reactor.core.publisher.Flux;
...
@@ -41,6 +41,7 @@ import reactor.core.publisher.Flux;
import
java.net.MalformedURLException
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.net.URL
;
import
java.nio.charset.StandardCharsets
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -163,7 +164,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService {
...
@@ -163,7 +164,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService {
chatMessageMapper
.
insert
(
assistantMessage
);
chatMessageMapper
.
insert
(
assistantMessage
);
});
});
}).
doOnError
(
throwable
->
{
}).
doOnError
(
throwable
->
{
//
log.error("[sendChatMessageStream][userId({}) sendReqVO({}) 发生异常]", userId, sendReqVO, throwable);
log
.
error
(
"[sendChatMessageStream][userId({}) sendReqVO({}) 发生异常]"
,
userId
,
sendReqVO
,
throwable
);
// 忽略租户,因为 Flux 异步无法透传租户
// 忽略租户,因为 Flux 异步无法透传租户
// TenantUtils.executeIgnore(() ->
// TenantUtils.executeIgnore(() ->
// chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(throwable.getMessage())));
// chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(throwable.getMessage())));
...
...
ruoyi-vue-pro-master-jdk17/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/fastgpt/FastGPTApi.java
View file @
2ef508ae
...
@@ -35,7 +35,7 @@ public class FastGPTApi {
...
@@ -35,7 +35,7 @@ public class FastGPTApi {
}
}
public
FastGPTApi
(
String
baseUrl
,
String
openAiToken
)
{
public
FastGPTApi
(
String
baseUrl
,
String
openAiToken
)
{
this
(
baseUrl
,
openAiToken
,
RestClient
.
builder
(),
WebClient
.
builder
());
this
(
baseUrl
,
openAiToken
,
RestClient
.
builder
(),
WebClient
.
builder
()
.
codecs
(
configurer
->
configurer
.
defaultCodecs
().
maxInMemorySize
(
10
*
1024
*
1024
))
);
}
}
public
FastGPTApi
(
String
baseUrl
,
String
openAiToken
,
RestClient
.
Builder
restClientBuilder
,
WebClient
.
Builder
webClientBuilder
)
{
public
FastGPTApi
(
String
baseUrl
,
String
openAiToken
,
RestClient
.
Builder
restClientBuilder
,
WebClient
.
Builder
webClientBuilder
)
{
...
...
ruoyi-vue-pro-master-jdk17/yudao-server/.DS_Store
View file @
2ef508ae
No preview for this file type
ruoyi-vue-pro-master-jdk17/yudao-server/src/main/resources/application-dev.yaml
View file @
2ef508ae
...
@@ -217,3 +217,7 @@ iot:
...
@@ -217,3 +217,7 @@ iot:
keepalive
:
60
keepalive
:
60
# 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
# 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
clearSession
:
true
clearSession
:
true
#spring:
# codec:
# max-in-memory-size: 16777216 # 16MB
ruoyi-vue-pro-master-jdk17/yudao-server/src/main/resources/application-local.yaml
View file @
2ef508ae
ruoyi-vue-pro-master-jdk17/yudao-server/src/main/resources/application.yaml
View file @
2ef508ae
...
@@ -145,7 +145,6 @@ spring:
...
@@ -145,7 +145,6 @@ spring:
missing-topics-fatal
:
false
# 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错
missing-topics-fatal
:
false
# 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错
---
#################### AI 相关配置 ####################
---
#################### AI 相关配置 ####################
spring
:
spring
:
ai
:
ai
:
vectorstore
:
# 向量存储
vectorstore
:
# 向量存储
...
...
yudao-ui-admin-vue3/src/types/auto-components.d.ts
View file @
2ef508ae
...
@@ -10,6 +10,8 @@ declare module 'vue' {
...
@@ -10,6 +10,8 @@ declare module 'vue' {
AddNode
:
typeof
import
(
'./../components/SimpleProcessDesigner/src/addNode.vue'
)[
'default'
]
AddNode
:
typeof
import
(
'./../components/SimpleProcessDesigner/src/addNode.vue'
)[
'default'
]
AppLinkInput
:
typeof
import
(
'./../components/AppLinkInput/index.vue'
)[
'default'
]
AppLinkInput
:
typeof
import
(
'./../components/AppLinkInput/index.vue'
)[
'default'
]
AppLinkSelectDialog
:
typeof
import
(
'./../components/AppLinkInput/AppLinkSelectDialog.vue'
)[
'default'
]
AppLinkSelectDialog
:
typeof
import
(
'./../components/AppLinkInput/AppLinkSelectDialog.vue'
)[
'default'
]
'AutoComponents.d'
:
typeof
import
(
'./auto-components.d.ts'
)[
'default'
]
'AutoImports.d'
:
typeof
import
(
'./auto-imports.d.ts'
)[
'default'
]
Backtop
:
typeof
import
(
'./../components/Backtop/src/Backtop.vue'
)[
'default'
]
Backtop
:
typeof
import
(
'./../components/Backtop/src/Backtop.vue'
)[
'default'
]
CardTitle
:
typeof
import
(
'./../components/Card/src/CardTitle.vue'
)[
'default'
]
CardTitle
:
typeof
import
(
'./../components/Card/src/CardTitle.vue'
)[
'default'
]
ColorInput
:
typeof
import
(
'./../components/ColorInput/index.vue'
)[
'default'
]
ColorInput
:
typeof
import
(
'./../components/ColorInput/index.vue'
)[
'default'
]
...
...
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