Skip to content
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

fix: summarize_page.py example #948

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GeorgeVince
Copy link

@GeorgeVince GeorgeVince commented Apr 6, 2025

Summary

Fixes a broken example.

List of files changed and why

docs/examples/summarize_page.py - the example didn't run, now it does.

How Has This Been Tested?

python ./docs/examples/summarize_page.py

[INIT].... → Crawl4AI 0.5.0.post8
[FETCH]... ↓ https://marketplace.visualstudio.com/items?itemNam... | Status: True | Time: 2.82s
[SCRAPE].. ◆ https://marketplace.visualstudio.com/items?itemNam... | Time: 0.013s
[EXTRACT]. ■ Completed for https://marketplace.visualstudio.com/items?itemNam... | Time: 3.7560698330635205s
[COMPLETE] ● https://marketplace.visualstudio.com/items?itemNam... | Status: True | Total: 6.59s
[{'title': 'Groqopilot', 'summary': "Groqopilot is a Visual Studio Code extension that integrates Llama3 and Groq, a high-speed inference engine, into your coding environment. It offers features like a chat interface, code generation, session management, and upcoming auto-completion. The extension supports contextual file and URL attachments, allowing users to fetch content into their chat context. Future plans include integration with speech-to-text functionality, support for multimodal interaction, enhancements to Groq's AI models, customizable prompts, and better context-awareness. Groqopilot is open-source, encouraging community contributions.", 'brief_summary': 'Groqopilot is a VS Code extension integrating Llama3 and Groq for fast coding assistance, featuring chat interface, code generation, and session management.', 'keywords': ['Groqopilot', 'Visual Studio Code', 'Llama3', 'Groq', 'coding assistant', 'chat interface', 'code generation', 'session management', 'auto-completion', 'open-source'], 'error': False}]

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added/updated unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

…uration

- Convert script to use asynchronous operations with AsyncWebCrawler

- Introduce main function for better structure

- Update imports to use async-compatible classes and functions

- Implement CrawlerRunConfig and LLMConfig for improved configuration management

- Enhance overall efficiency and scalability of the page summarization script

🤖 Generated with [avante.nvim](https://github.com/yetone/avante.nvim)

Co-Authored-By: avante.nvim <[email protected]>

Signed-off-by: George Vince <[email protected]>
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