Cookboook with Firecrawl #200#206
Open
AnandKrishnamoorthy1 wants to merge 6 commits intousemoss:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "#pip install firecrawl-py moss python-dotenv" |
Comment on lines
+109
to
+111
| " id=f\"firecrawl-{index}\",\n", | ||
| " text=page.markdown,\n", | ||
| " metadata={\"source_url\": page.url, \"title\": page.title or \"\"},\n", |
Comment on lines
+155
to
+165
| "async def prepare_knowledge_base(urls: list[str], limit: int = 10) -> tuple[MossClient, str]:\n", | ||
| " validate_configuration(urls)\n", | ||
| " crawled_pages = crawl_urls(urls, limit=limit)\n", | ||
| " documents = crawled_pages_to_moss_docs(crawled_pages)\n", | ||
| "\n", | ||
| " if not documents:\n", | ||
| " raise RuntimeError(\"Firecrawl returned no markdown content to index.\")\n", | ||
| "\n", | ||
| " index_name = f\"firecrawl-cookbook-{uuid.uuid4().hex[:8]}\"\n", | ||
| " client = MossClient(MOSS_PROJECT_ID, MOSS_PROJECT_KEY)\n", | ||
| "\n", |
Comment on lines
+53
to
+55
| ├──> Markdown Normalization | ||
| │ (clean text, remove chrome) | ||
| │ |
Comment on lines
+11
to
+13
| # Optional: default index name used by the notebook | ||
| MOSS_INDEX_NAME=firecrawl-demo | ||
|
|
Comment on lines
+289
to
+291
| "display_name": "Python [conda env:base] *", | ||
| "language": "python", | ||
| "name": "conda-base-py" |
| " print(f\" {item.text[:200].strip()}\")\n", | ||
| "\n", | ||
| "\n", | ||
| "# Build knowledgebase and query it in one step\n", |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Collaborator
|
Hi @AnandKrishnamoorthy1 , thank you for working on this pr. were you able to solve the ai comments ? |
Author
@yatharthk2 Yes, I have. Lmk if you have any other comments, or else you can merge and close this PR |
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.
Pull Request Checklist
Please ensure that your PR meets the following requirements:
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes #200
Type of Change