File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/com/xiaozhi/service/impl Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -105,12 +105,10 @@ public List<SysAgent> query(SysAgent agent) {
105105 * @return 智能体集合
106106 */
107107 private List <SysAgent > getDifyAgents (SysAgent agent ) {
108- Integer userId = agent .getUserId ();
109108 List <SysAgent > agentList = new ArrayList <>();
110109
111110 // 查询所有类型的Dify配置
112111 SysConfig queryConfig = new SysConfig ();
113- queryConfig .setUserId (userId );
114112 queryConfig .setProvider ("dify" );
115113 List <SysConfig > allConfigs = configMapper .query (queryConfig );
116114
@@ -137,6 +135,8 @@ private List<SysAgent> getDifyAgents(SysAgent agent) {
137135 String apiKey = agentConfig .getApiKey ();
138136 String apiUrl = agentConfig .getApiUrl ();
139137 Integer configId = agentConfig .getConfigId ();
138+ Integer userId = agentConfig .getUserId ();
139+
140140
141141 // 检查是否已存在对应的llm配置
142142 SysConfig existingLlmConfig = llmConfigMap .get (apiKey );
@@ -275,7 +275,8 @@ private List<SysAgent> getCozeAgents(SysAgent agent) {
275275 // 获取API密钥和空间ID
276276 String apiSecret = config .getApiSecret ();
277277 String spaceId = config .getAppId ();
278- Integer userId = agent .getUserId ();
278+ // 普通用户应该只能查询使用管理员配置的内容
279+ Integer userId = config .getUserId ();
279280
280281 try {
281282 // 调用Coze API获取智能体列表
You can’t perform that action at this time.
0 commit comments