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

Feature remove global config in the search/browser engine #820

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

shenchucheng
Copy link
Collaborator

Features

  • Replace parse_obj_as with TypeAdapter.validate_python
  • Remove the global config in the search/browser engine
  • Allow access to private_context when validating Action using the model_validator(mode="after") decorator
  • Replace the __init__ method with model_validator in the WebBrowserEngine/SearchEngine/ContextMixin class to make it more annotation-friendly

Result

image

@shenchucheng shenchucheng changed the title Feature remove config Feature remove global config in the search/browser engine Feb 1, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: 37 lines in your changes are missing coverage. Please review.

Comparison is base (9ecdccd) 85.25% compared to head (e246a9c) 84.50%.
Report is 1 commits behind head on dev.

Files Patch % Lines
metagpt/actions/search_and_summarize.py 22.22% 7 Missing ⚠️
metagpt/tools/search_engine.py 85.71% 6 Missing ⚠️
metagpt/roles/sales.py 44.44% 5 Missing ⚠️
metagpt/tools/search_engine_googleapi.py 76.19% 5 Missing ⚠️
metagpt/roles/searcher.py 60.00% 4 Missing ⚠️
metagpt/tools/search_engine_serpapi.py 76.92% 3 Missing ⚠️
metagpt/tools/search_engine_serper.py 78.57% 3 Missing ⚠️
metagpt/tools/web_browser_engine.py 92.30% 2 Missing ⚠️
metagpt/tools/web_browser_engine_playwright.py 88.23% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #820      +/-   ##
==========================================
- Coverage   85.25%   84.50%   -0.76%     
==========================================
  Files         186      186              
  Lines        9871     9934      +63     
==========================================
- Hits         8416     8395      -21     
- Misses       1455     1539      +84     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@geekan
Copy link
Owner

geekan commented Feb 2, 2024

update https://github.com/geekan/MetaGPT-docs/ is also needed.

Copy link
Owner

@geekan geekan left a comment

Choose a reason for hiding this comment

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

LGTM

@geekan geekan merged commit ec97645 into geekan:dev Feb 2, 2024
1 of 3 checks passed
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.

3 participants