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

Saying "hello" to cloned elon leads to KeyError: 'None' #18

Open
motin opened this issue Aug 26, 2023 · 0 comments
Open

Saying "hello" to cloned elon leads to KeyError: 'None' #18

motin opened this issue Aug 26, 2023 · 0 comments

Comments

@motin
Copy link

motin commented Aug 26, 2023

Environment:
Apple M1 Max
13.5 (22G74)

Steps to reproduce:

  1. Follow the GentPool readme to install GentPool:
conda create --name gentenv python=3.10
conda activate gentenv
pip install gentopia
git clone [email protected]:Gentopia-AI/GentPool.git
cd GentPool
touch .env
echo "OPENAI_API_KEY=<my_openai_api_key>" >> .env
  1. Then clone and assemble elon as per the README (omitting --print_agent due to Using --print_agent leads to RecursionError: maximum recursion depth exceeded while calling a Python object #17):
./clone_agent elon foo
python assemble.py foo
  1. Write "hello" and press enter

Expected results:
No exception thrown. Maybe the agent realizes that there is no ask and resolves to responding in a polite and friendly manner, but no exception should be thrown that prevents the agent from doing so.

Actual results:
Exception thrown:

$ python assemble.py foo
╭───────────────────────────────────────────────────── Gentopia ──────────────────────────────────────────────────────╮
│ Welcome to Gentopia!                                                                                                │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
User: hello
foo:
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ foo ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ The user has greeted me. I should respond in a polite and friendly manner.                                          ┃
┃                                                                                                                     ┃
┃ Action: None                                                                                                        ┃
┃                                                                                                                     ┃
┃ Action Input: None                                                                                                  ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Traceback (most recent call last):
  File "/Users/motin/Dev/Projects/generative-reality/reproduce-issue/GentPool/assemble.py", line 41, in <module>
    main()
  File "/Users/motin/Dev/Projects/generative-reality/reproduce-issue/GentPool/assemble.py", line 37, in main
    chat(agent, verbose=print_agent)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/gentenv/lib/python3.10/site-packages/gentopia/__init__.py", line 26,
in chat
    response = agent.stream(text, output=output)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/gentenv/lib/python3.10/site-packages/gentopia/agent/react/agent.py",
line 224, in stream
    result = self._format_function_map()[action](tool_input)
KeyError: 'None'
⠸ Calling function: None ...
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

No branches or pull requests

1 participant