Giter Club home page Giter Club logo

chrome-gpt's Issues

Selenium error on Chrome version

When starting chromeGPT, I get the following error:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 111
Current browser version is 113.0.5672.63 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

Can it use the debugger tools? Can it read and parse the source? Can it help me write e2e Cypress tests?

Title says it all.. those are the things I'm currently in search for. I want to be able to tell it to load a URL, and write me a Cypress script for interacting with elements on the website. It would need to find the relevant items I've asked it to interact with, perform the action but also capture the DOM of these elements so it can then use those to write a script for use with automated testing.

It would be pretty crazy if it can do that! Can it? And if not.. why not?

Many thanks for this exciting work you're doing!

ModuleNotFoundError: No module named 'langchain.experimental'

Any idea what I am getting the issue below?

I have installed langchain module many times.

python3 -m chromegpt --help
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/git/Chrome-GPT/chromegpt/main.py", line 4, in
from chromegpt.main import run_chromegpt
File "/root/git/Chrome-GPT/chromegpt/main.py", line 1, in
from chromegpt.agent.autogpt import AutoGPTAgent
File "/root/git/Chrome-GPT/chromegpt/agent/autogpt/init.py", line 2, in
from .autogpt import AutoGPTAgent # noqa: F401
File "/root/git/Chrome-GPT/chromegpt/agent/autogpt/autogpt.py", line 6, in
from langchain.experimental import AutoGPT
ModuleNotFoundError: No module named 'langchain.experimental'

Regression?: Unable to run inside or outside of Docker

So with latest version of main, I am unable to get Docker running on my setup, most likely because I am on a M1 setup and the chromedriver fails to be found for my setup.

So then I figured I'd try to run it manually outside of Docker like I am used to and was unable to:

  File "/Users/stefanayala/Library/Caches/pypoetry/virtualenvs/chrome-gpt-eEQoRrTE-py3.11/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='selenium-chrome', port=4444): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x11344e910>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))

Looks like it has trouble connecting to the grid

So then I went wanted to go back to last known working changes:

  • Rolled back changes to eb7cbce
  • poetry remove selenium
  • poetry add selenium

This installed the newer version of Selenium which allowed me to run ChromeGPT with latest version of Chrome (yay!).

Maybe someone else can validate that they are able to get this project running outside of Docker with latest version of main?

Error: Got unexpected extra argument ()

(chrome-gpt-py3.11) PS C:\Users\Administrator\Desktop\git\chrome-gpt> python -m chromegpt -t open youtube
Usage: python -m chromegpt [OPTIONS]
Try 'python -m chromegpt --help' for help.

Error: Got unexpected extra argument (youtube)
(chrome-gpt-py3.11) PS C:\Users\Administrator\Desktop\git\chrome-gpt>

No matter what command I run, it always says it can't run because it has too many arguments.
Any idea how to fix it?

Unable to install

Hello,
I tried on Fedora 37 without success 😞

poetry install
Creating virtualenv chrome-gpt-znLkX84X-py3.11 in XXX

  RuntimeError

  The lock file is not compatible with the current version of Poetry.
  Upgrade Poetry to be able to read the lock file or, alternatively, regenerate the lock file with the `poetry lock` command.

  at /usr/lib/python3.11/site-packages/poetry/packages/locker.py:481 in _get_lock_data
      477β”‚                 "Upgrade Poetry to ensure the lock file is read properly or, alternatively, "
      478β”‚                 "regenerate the lock file with the `poetry lock` command."
      479β”‚             )
      480β”‚         elif not lock_version_allowed:
    β†’ 481β”‚             raise RuntimeError(
      482β”‚                 "The lock file is not compatible with the current version of Poetry.\n"
      483β”‚                 "Upgrade Poetry to be able to read the lock file or, alternatively, "
      484β”‚                 "regenerate the lock file with the `poetry lock` command."
      485β”‚             )

I tried to lock, same error.

Poetry version 1.1.14

Won't show Chrome GUI

The scripts renders web pages in headless mode, even though I have not added that flag.

Command: python -m chromegpt -a auto-gpt -v -t "visit google.com"

The code is run in a docker container on Windows 11.

Chrome dev mode is enabled.

NameError: name 'v_args' is not defined. Did you mean: 'vars'?

Hello,

I installed with:

git clone https://github.com/richardyc/Chrome-GPT.git
cd Chrome-GPT
poetry install
poetry shell
export OPENAI_API_KEY=<KEY>

I had to pip install click and langchain.

poetry --version 
Poetry (version 1.4.2)

But then when I run a command I get this:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/.../Chrome-GPT/Chrome-GPT/chromegpt/__main__.py", line 4, in <module>
    from chromegpt.main import run_chromegpt
  File "/home/.../Chrome-GPT/Chrome-GPT/chromegpt/main.py", line 1, in <module>
    from chromegpt.agent.autogpt import AutoGPTAgent
  File "/home/.../Chrome-GPT/Chrome-GPT/chromegpt/agent/autogpt/__init__.py", line 2, in <module>
    from .autogpt import AutoGPTAgent  # noqa: F401
  File "/home/.../Chrome-GPT/Chrome-GPT/chromegpt/agent/autogpt/autogpt.py", line 6, in <module>
    from langchain.experimental import AutoGPT
  File "/home/.../.cache/pypoetry/virtualenvs/chrome-gpt-WWC1HBYi-py3.10/lib/python3.10/site-packages/langchain/experimental/__init__.py", line 3, in <module>
    from langchain.experimental.generative_agents.generative_agent import GenerativeAgent
  File "/home/.../.cache/pypoetry/virtualenvs/chrome-gpt-WWC1HBYi-py3.10/lib/python3.10/site-packages/langchain/experimental/generative_agents/__init__.py", line 2, in <module>
    from langchain.experimental.generative_agents.generative_agent import GenerativeAgent
  File "/home/.../.cache/pypoetry/virtualenvs/chrome-gpt-WWC1HBYi-py3.10/lib/python3.10/site-packages/langchain/experimental/generative_agents/generative_agent.py", line 9, in <module>
    from langchain.experimental.generative_agents.memory import GenerativeAgentMemory
  File "/home/.../.cache/pypoetry/virtualenvs/chrome-gpt-WWC1HBYi-py3.10/lib/python3.10/site-packages/langchain/experimental/generative_agents/memory.py", line 8, in <module>
    from langchain.retrievers import TimeWeightedVectorStoreRetriever
  File "/home/.../.cache/pypoetry/virtualenvs/chrome-gpt-WWC1HBYi-py3.10/lib/python3.10/site-packages/langchain/retrievers/__init__.py", line 9, in <module>
    from langchain.retrievers.self_query.base import SelfQueryRetriever
  File "/home/.../.cache/pypoetry/virtualenvs/chrome-gpt-WWC1HBYi-py3.10/lib/python3.10/site-packages/langchain/retrievers/self_query/base.py", line 8, in <module>
    from langchain.chains.query_constructor.base import load_query_constructor_chain
  File "/home/.../.cache/pypoetry/virtualenvs/chrome-gpt-WWC1HBYi-py3.10/lib/python3.10/site-packages/langchain/chains/query_constructor/base.py", line 14, in <module>
    from langchain.chains.query_constructor.parser import get_parser
  File "/home/.../.cache/pypoetry/virtualenvs/chrome-gpt-WWC1HBYi-py3.10/lib/python3.10/site-packages/langchain/chains/query_constructor/parser.py", line 50, in <module>
    @v_args(inline=True)
NameError: name 'v_args' is not defined. Did you mean: 'vars'?

Any idea?

raise MaxRetryError

When I try to run and give a task to Chrome-GPT, I received this error

raise MaxRetryError(_pool, url, error or ResponseError(cause))

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='selenium-chrome', port=4444): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1199345d0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))

A few modules are not found and how to run

Click, Langchain, selenium, validators modules need to be installed prior to running the code if you have not got them already. Also >> poetry shell command does not work because it is not placed in the home directory. Therefore referring to this link may be helpful https://stackoverflow.com/questions/60768676/what-is-the-default-install-path-for-poetry.

After all these issues addressed, running "python -m chromegpt" produces an error -> Error: Missing option '--task' / '-t'. After revising the command to "python -m chromegpt --task", another error arises -> Error: Option '--task' requires an argument. To correct this, the comment in the General section should be noted -> python -m chromegpt -t "{your request}" and your request could be one of the options below: "auto-gpt", "baby-agi", or "zero-shot". One example would be python -m chromegpt -t "auto-gpt".

metaclass conflict

Hey Richard, Thanks for the code, but when I try to run it on my Windows Machine then I got the below error. Can you please let me know how can I resolve this.

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "D:\Agent\ChromGPTV2\chromegpt_main
.py", line 4, in
from chromegpt.main import run_chromegpt
File "D:\Agent\ChromGPTV2\chromegpt\main.py", line 1, in
from chromegpt.agent.autogpt import AutoGPTAgent
File "D:\Agent\ChromGPTV2\chromegpt\agent\autogpt_init
.py", line 2, in
from .autogpt import AutoGPTAgent # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Agent\ChromGPTV2\chromegpt\agent\autogpt\autogpt.py", line 16, in
from chromegpt.agent.autogpt.prompt import AutoGPTPrompt
File "D:\Agent\ChromGPTV2\chromegpt\agent\autogpt\prompt.py", line 16, in
class AutoGPTPrompt(BaseChatPromptTemplate, BaseModel):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

If any other folk can help me, then it will be great. Thanks

How extract data

How to extract data from website

I try python -m chromegpt -v -t "on https://www.specialized.com/fr/fr/rockhopper-elite-27-5/p/199582\?color\=319847-199582 extract bike infos"
to get all bike information

prompt return:

The scroll function did not reveal the bike information. The find_form function did not return the bike information either. However, the click function successfully navigated to a page with the bike information. I will now manually extract the bike information.

Final Answer: The bike information for the Specialized Rockhopper Elite 27.5 can be found on the following page: https://www.specialized.com/fr/fr/rockhopper-elite-27-5/p/199582?color=319847-199582.

> Finished chain.

ModuleNotFoundError: No module named 'langchain.experimental'

After installing and executing all the setups in Windows 11 PowerShell command line, the following error occurred.

PS C:\Users\Jun\code\Chrome-GPT> python -m chromegpt Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\Jun\code\Chrome-GPT\chromegpt\__main__.py", line 4, in <module> from chromegpt.main import run_chromegpt File "C:\Users\Jun\code\Chrome-GPT\chromegpt\main.py", line 1, in <module> from chromegpt.agent.autogpt import AutoGPTAgent File "C:\Users\Jun\code\Chrome-GPT\chromegpt\agent\autogpt\__init__.py", line 2, in <module> from .autogpt import AutoGPTAgent # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jun\code\Chrome-GPT\chromegpt\agent\autogpt\autogpt.py", line 6, in <module> from langchain.experimental import AutoGPT ModuleNotFoundError: No module named 'langchain.experimental'

What else needs to be configured? Thank you.

langchain.schema.OutputParserException: Could not parse LLM output

I get this is a known issue but it happens 90% of the time, is there any way this can get improved or do we have to wait for 4.0 API key to see improvements? Sorry not exactly sure what the issue is and how to improve it.

Besides that, I was EXTREMELY impressed with this....the logic it took was fascinating and figuring out what elements to select was fantastic, but it wouldn't get past the first step 80% of the time but when it did it was great to see!

I would love to see this resolved because it's hard to demo this tool otherwise (I was planning to today but it crashes too much and I wanted to give it a fair shake before livestreaming it)

Would 4.0 API key improve this specific issue?

Please update a detailed demo example.

Please update a detailed demo exampleπŸ™πŸ™πŸ™
If possible, it's best to take it step by step

  1. export OPENAI_API_KEY=xxx && python chrome gpt -t 'some demo infomations...'
  2. other stuff..

Unfortunately, can not understand what can i do by current demo video. πŸ˜‚πŸ˜‚πŸ˜‚

Windows errors

(chrome-gpt-py3.10) PS C:\Chrome-GPT> python -m chromegpt -v -t "test"
Traceback (most recent call last):
File "C:\Users\nsk\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\nsk\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Chrome-GPT\chromegpt_main
.py", line 4, in
from chromegpt.main import run_chromegpt
File "C:\Chrome-GPT\chromegpt\main.py", line 3, in
from chromegpt.agent.zeroshot import BabyAGIAgent, ZeroShotAgent
File "C:\Chrome-GPT\chromegpt\agent\zeroshot.py", line 49
verbose=verbose,
IndentationError: unexpected indent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.