Skip to content

Commit

Permalink
feat: Add file name to knowledge properties in crawl_endpoint (#3346)
Browse files Browse the repository at this point in the history
The `crawl_endpoint` function in `crawl_routes.py` now includes the
`file_name` property in the `knowledge_to_add` object. This change
ensures that the file name is properly associated with the crawled
knowledge, improving the accuracy and organization of the data.

Co-authored-by: Stan Girard <[email protected]>

# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
  • Loading branch information
StanGirard authored Oct 8, 2024
1 parent 25057f9 commit eea702d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/api/quivr_api/routes/crawl_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ async def crawl_endpoint(
)
knowledge_to_add = CreateKnowledgeProperties(
brain_id=brain_id,
file_name=crawl_website.url,
url=crawl_website.url,
extension=".html",
source="web",
Expand Down
1 change: 1 addition & 0 deletions backend/supabase/migrations/20241008154800_check_file.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."knowledge" drop constraint if exists "knowledge_check";

0 comments on commit eea702d

Please sign in to comment.