Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for OTS (Alibaba TableStore) as a new knowledge base provider to the AgentRun SDK. The implementation follows the existing patterns established for other providers (Bailian, RagFlow, ADB) and adds comprehensive configuration, retrieval, and example code for the new OTS provider.
Changes:
- Added OTS provider support with comprehensive configuration models including metadata fields, embedding configuration, and multiple search/reranking modes
- Implemented OTSDataAPI class with support for dense vector search, full-text search, and hybrid search with RRF/Weight/Model reranking strategies
- Added complete example functions demonstrating OTS knowledge base creation, querying, updating, and deletion
- Updated all necessary exports and imports across the module hierarchy
- Added new dependency:
tablestore-agent-storage>=1.0.4
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Added tablestore-agent-storage dependency |
| agentrun/knowledgebase/model.py | Added OTS configuration models (provider settings, embedding config, search configs, reranking configs) |
| agentrun/knowledgebase/knowledgebase.py | Added OTS settings conversion logic for camelCase to snake_case transformation |
| agentrun/knowledgebase/api/data.py | Implemented OTSDataAPI class with retrieve methods and configuration building |
| agentrun/knowledgebase/api/__data_async_template.py | Added OTS async template implementation |
| agentrun/knowledgebase/api/init.py | Exported OTSDataAPI |
| agentrun/knowledgebase/init.py | Exported all OTS-related classes and models |
| agentrun/knowledgebase/__knowledgebase_async_template.py | Added OTS settings conversion in async template |
| examples/knowledgebase.py | Added complete OTS example functions and updated documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
添加OTSDataAPI及相关模型配置类,扩展知识库功能支持表格存储数据源。更新依赖版本并完善相关模板文件。 Co-developed-by: Aone Copilot <noreply@alibaba-inc.com> Signed-off-by: Sodawyx <sodawyx@126.com>
OhYee
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
添加OTSDataAPI及相关模型配置类,扩展知识库功能支持表格存储数据源。更新依赖版本并完善相关模板文件。
Co-developed-by: Aone Copilot noreply@alibaba-inc.com
Fix bugs
Bug detail
Pull request tasks
Update docs
Reason for update
Pull request tasks
Add contributor
Contributed content
Content detail
Others
Reason for update