Skip to content

perf: ai-chat-node: Improve the performance of reading data#6222

Open
wangliang181230 wants to merge 1 commit into
1Panel-dev:v2from
wangliang181230:PR/55-perf-aiChat_loadDatas
Open

perf: ai-chat-node: Improve the performance of reading data#6222
wangliang181230 wants to merge 1 commit into
1Panel-dev:v2from
wangliang181230:PR/55-perf-aiChat_loadDatas

Conversation

@wangliang181230

@wangliang181230 wangliang181230 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

perf: ai-chat-node: Improve the performance of reading data


AI 对话 节点:提升读取数据的性能,先根据ID列表把数据查出来,再通过代码筛选数据。而不是每次使用单个ID查数据。这样可以减少DB的交互次数。

self.content = content
self.title = title
self.status = status,
self.status = status

@wangliang181230 wangliang181230 Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

顺便修复个BUG 1:多了个逗号

status,tuple 类型的数据,等于 (status,) 不是 status

@wangliang181230 wangliang181230 force-pushed the PR/55-perf-aiChat_loadDatas branch 2 times, most recently from 0a7ed9f to 6f67b28 Compare June 14, 2026 16:00
@wangliang181230 wangliang181230 force-pushed the PR/55-perf-aiChat_loadDatas branch from 6f67b28 to 2624692 Compare June 14, 2026 16:06
is_active, 3, 0.65, SearchMode.embedding
)
return result[0]
return result[0] if result else None

@wangliang181230 wangliang181230 Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

顺便修复个BUG 2:

query 方法的参数数量都没对上,修复一下。
不过查了下源码,BaseVectorStore.search(...) 方法好像没有地方在调用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant