Skip to content

feat(rag): add api /retrieval/bot #794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged

feat(rag): add api /retrieval/bot #794

merged 1 commit into from
Apr 3, 2025

Conversation

ch-liuzhide
Copy link
Contributor

image

@ch-liuzhide ch-liuzhide requested a review from xingwanying April 2, 2025 09:35
Copy link

vercel bot commented Apr 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 2, 2025 9:36am

Copy link

Walkthrough

This PR introduces a new API endpoint /retrieval/bot in the server/rag/router.py file. It modifies existing classes and functions to accommodate the new endpoint, which retrieves content based on bot and repository IDs. The PR also updates dependencies in server/requirements.txt and refactors code to use new models and configurations.

Changes

Files Summary
server/bot/builder.py Replaced KnowledgeCreate and KnowledgeSplitConfig with GithubRepoCreate and BaseCharSplitConfig. Updated parameters for knowledge addition.
server/rag/router.py Added new API endpoint /retrieval/bot. Introduced RetrievalByBotRequest class and updated knowledge addition logic.
server/requirements.txt Updated whiskerrag dependency version from 0.0.15 to 0.0.27.

bot_id_list = params.bot_id_list
repo_name_list = params.repo_name_list
space_id_list = repo_name_list + bot_id_list
if len(space_id_list) == 0:

Choose a reason for hiding this comment

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

The check for an empty space_id_list is crucial to prevent API calls with invalid parameters. Ensure this validation is maintained to avoid potential errors.

Copy link

codecov bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 61.90476% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/rag/router.py 61.90% 8 Missing ⚠️
Files with missing lines Coverage Δ
server/bot/builder.py 31.42% <ø> (ø)
server/rag/router.py 44.57% <61.90%> (+0.71%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ch-liuzhide ch-liuzhide merged commit 4cfe7bc into main Apr 3, 2025
5 of 6 checks passed
@ch-liuzhide ch-liuzhide deleted the feat/retrieval_bot branch April 3, 2025 02:58
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