Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
shun peng
/
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
88efbb4f
authored
Jul 06, 2025
by
彭顺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: get-used-agents auth error
parent
1217d4e3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
0 deletions
+5
-0
.DS_Store
+0
-0
ruoyi-vue-pro-master-jdk17/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/admin/agent/AgentChatController.java
+2
-0
ruoyi-vue-pro-master-jdk17/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java
+3
-0
No files found.
.DS_Store
View file @
88efbb4f
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/controller/admin/agent/AgentChatController.java
View file @
88efbb4f
...
@@ -73,12 +73,14 @@ public class AgentChatController {
...
@@ -73,12 +73,14 @@ public class AgentChatController {
@PostMapping
(
"/create-agent-records"
)
@PostMapping
(
"/create-agent-records"
)
@Operation
(
summary
=
"创建对话过的智能体记录"
)
@Operation
(
summary
=
"创建对话过的智能体记录"
)
@PermitAll
public
CommonResult
<
Long
>
createChatAgentRecord
(
@RequestBody
@Valid
AgentCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
createChatAgentRecord
(
@RequestBody
@Valid
AgentCreateReqVO
createReqVO
)
{
return
success
(
chatConversationService
.
createUsedAgentRecord
(
createReqVO
,
getLoginUserId
()));
return
success
(
chatConversationService
.
createUsedAgentRecord
(
createReqVO
,
getLoginUserId
()));
}
}
@GetMapping
(
"/get-used-agents"
)
@GetMapping
(
"/get-used-agents"
)
@Operation
(
summary
=
"获得对话过的智能体列表"
)
@Operation
(
summary
=
"获得对话过的智能体列表"
)
@PermitAll
public
CommonResult
<
List
<
AgentUsedRespVO
>>
getChatAgentList
()
{
public
CommonResult
<
List
<
AgentUsedRespVO
>>
getChatAgentList
()
{
List
<
AiChatConversationDO
>
list
=
chatConversationService
.
getChatAgentListByUserId
(
getLoginUserId
());
List
<
AiChatConversationDO
>
list
=
chatConversationService
.
getChatAgentListByUserId
(
getLoginUserId
());
...
...
ruoyi-vue-pro-master-jdk17/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java
View file @
88efbb4f
...
@@ -174,6 +174,9 @@ public class AiChatConversationServiceImpl implements AiChatConversationService
...
@@ -174,6 +174,9 @@ public class AiChatConversationServiceImpl implements AiChatConversationService
@Override
@Override
public
Long
createUsedAgentRecord
(
AgentCreateReqVO
createReqVO
,
Long
userId
)
{
public
Long
createUsedAgentRecord
(
AgentCreateReqVO
createReqVO
,
Long
userId
)
{
if
(
userId
==
null
){
throw
exception
(
USER_NOT_LOGIN
);
}
// 1.1 获得 AiChatRoleDO 聊天角色
// 1.1 获得 AiChatRoleDO 聊天角色
AiChatRoleDO
role
=
chatRoleService
.
validateChatRole
(
createReqVO
.
getRoleId
());
AiChatRoleDO
role
=
chatRoleService
.
validateChatRole
(
createReqVO
.
getRoleId
());
// 1.2 获得 AiChatModelDO 聊天模型
// 1.2 获得 AiChatModelDO 聊天模型
...
...
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