Auto-GPT-Plugins icon indicating copy to clipboard operation
Auto-GPT-Plugins copied to clipboard

Add Baidu Search Plugin

Open ForestLinSen opened this issue 2 years ago • 5 comments

A separate plugin to integrate the Baidu search engine into AutoGPT

ForestLinSen avatar Apr 27 '23 18:04 ForestLinSen

Got my Baidu account setup today so should be able to review in less than 24 hours

ntindle avatar Apr 29 '23 19:04 ntindle

Got my Baidu account setup today so should be able to review in less than 24 hours

I think Baidu account is not necessary here, you could try to search for something on Baidu and then use the Cookie stored in your browser to set the .env variable

ForestLinSen avatar Apr 30 '23 10:04 ForestLinSen

You need to put your python dependencies in requirements.txt :3

Found module 'baidu_search' at: plugins/Auto-GPT-Plugins/src/autogpt_plugins/baidu_search/__init__.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/workspace/Auto-GPT/autogpt/__main__.py", line 5, in <module>
    autogpt.cli.main()
  File "/home/vscode/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/vscode/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/vscode/.local/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "/home/vscode/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/vscode/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/vscode/.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/workspace/Auto-GPT/autogpt/cli.py", line 90, in main
    run_auto_gpt(
  File "/workspace/Auto-GPT/autogpt/main.py", line 104, in run_auto_gpt
    cfg.set_plugins(scan_plugins(cfg, cfg.debug_mode))
  File "/workspace/Auto-GPT/autogpt/plugins.py", line 230, in scan_plugins
    loaded_plugins.append(a_module())
  File "/home/vscode/.local/lib/python3.10/site-packages/abstract_singleton/__init__.py", line 14, in __call__
    cls._instances[cls] = super().__call__(*args, **kwargs)
  File "plugins/AllowUnzippedPlugins.zip/Auto-GPT-AllowUnzippedPlugins-master/src/allow_unzipped_plugins/__init__.py", line 32, in __init__
  File "plugins/AllowUnzippedPlugins.zip/Auto-GPT-AllowUnzippedPlugins-master/src/allow_unzipped_plugins/plugin_manager.py", line 34, in load_unzipped_plugins
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/workspace/Auto-GPT/plugins/Auto-GPT-Plugins/src/autogpt_plugins/baidu_search/__init__.py", line 5, in <module>
    from .baidu_search import _baidu_search
ModuleNotFoundError: No module named 'baidu_search'

Hi, baidu_search is not some other module but the Python file that is located in the same folder as __init__.py, could you make sure it exists in the same folder? Or maybe you can try to download this plugin as a zip file in this repo to see if it works

ForestLinSen avatar Apr 30 '23 10:04 ForestLinSen

This is a mass message from the AutoGPT core team to all open Plugin-PRs

We're in the process of re-architecting: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

Please be patient as we work to clean up the AutoGPT core.

If you already have an existing plug-in that’s affected, please message @ntindle on Discord so we can get your plugin spinning on the new architecture.

If you're working on a plugin, please bear in mind that one of our primary goals in re-architecting is to make life MUCH easier for you. We've taken aboard feedback from plugin developers. We're on it, so please give us some time!

<3 The AutoGPT Team

p-i- avatar May 06 '23 01:05 p-i-

Codecov Report

Patch coverage: 69.56% and project coverage change: +0.17 :tada:

Comparison is base (370cefd) 67.21% compared to head (da037bc) 67.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #72      +/-   ##
==========================================
+ Coverage   67.21%   67.38%   +0.17%     
==========================================
  Files          21       24       +3     
  Lines        1458     1573     +115     
  Branches      180      185       +5     
==========================================
+ Hits          980     1060      +80     
- Misses        462      494      +32     
- Partials       16       19       +3     
Impacted Files Coverage Δ
src/autogpt_plugins/baidu_search/baidu_search.py 61.90% <61.90%> (ø)
src/autogpt_plugins/baidu_search/__init__.py 62.90% <62.90%> (ø)
...plugins/baidu_search/test_auto_gpt_baidu_plugin.py 87.50% <87.50%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar May 10 '23 10:05 codecov[bot]