Skip to content

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

@motin

Description

@motin

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 git@github.com: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 ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions