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

[Bug]: Autobuilded agents with spaces in their names #941

Closed
piopy opened this issue Dec 11, 2023 · 1 comment
Closed

[Bug]: Autobuilded agents with spaces in their names #941

piopy opened this issue Dec 11, 2023 · 1 comment
Assignees

Comments

@piopy
Copy link

piopy commented Dec 11, 2023

Describe the bug

AgentBuilder creates agents that contains spaces in their names.

When initializing the conversation, I receive the following error:
BadRequestError: Error code: 400 - {'error': {'message': "' Content_Generator' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.3.name'", 'type': 'invalid_request_error', 'param': None, 'code': None}}

Steps to reproduce

Step 1: install dependencies
Step 2: write API key and model (gpt-3.5-turbo) in a json for the autobuilder. Set also the llm_config dictionary for the conversation. (same gpt used)
Step 3: Set AutoBuilder and write the building task
Step 4: Create agent_list, agent_configs using builder.build(building_task, llm_config)
Step 5: Create a GroupChat and a manager (same llm_config)
Step 6: Initiate conversation with agent_list[0] to the manager defining a problem. Error will come if AutoBuilder generated wrong formatted names.

Expected Behavior

Autobuilt agents conversating each other

Screenshots and logs

image

Additional Information

openai == 1.3.8
pyautogen == 0.2.2 (pip install git+https to this repo)

I used a workaround in the AutoBuilder's prompt, adding "Generate agents without spaces in their names." command

@LinxinS97
Copy link
Contributor

LinxinS97 commented Dec 11, 2023

The instruction following ability for gpt-3.5-turbo is very weak. The generated name cannot be guaranteed to follow an expected format when using gpt-3.5 series model. To ensure the quality of agents, I highly recommend using gpt-4 (or gpt-4-1106-preview) instead as the build_manager.
For this issue, I will add a trigger to replace the space as underline later.

@piopy piopy closed this as completed Dec 13, 2023
github-merge-queue bot pushed a commit that referenced this issue Dec 18, 2023
…tion (#944)

* try to fix blog

* modify blog

* fix test error in #717; fix blog typo in installation; update blogs with output examples.

* pre-commit

* pre-commit

* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx

Co-authored-by: Qingyun Wu <[email protected]>

* add future work

* fix grammar

* update agent_builder

* solve #941; add detailed debug info; support json string config

* pre-commit

* solve #954

* pre-commit

---------

Co-authored-by: Jieyu Zhang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
rlam3 pushed a commit to rlam3/autogen that referenced this issue Dec 19, 2023
…tion (microsoft#944)

* try to fix blog

* modify blog

* fix test error in microsoft#717; fix blog typo in installation; update blogs with output examples.

* pre-commit

* pre-commit

* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx

Co-authored-by: Qingyun Wu <[email protected]>

* add future work

* fix grammar

* update agent_builder

* solve microsoft#941; add detailed debug info; support json string config

* pre-commit

* solve microsoft#954

* pre-commit

---------

Co-authored-by: Jieyu Zhang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Jan 6, 2024
…ng agent descriptions (#1039)

* try to fix blog

* modify blog

* fix test error in #717; fix blog typo in installation; update blogs with output examples.

* pre-commit

* pre-commit

* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx

Co-authored-by: Qingyun Wu <[email protected]>

* add future work

* fix grammar

* update agent_builder

* solve #941; add detailed debug info; support json string config

* pre-commit

* solve #954

* pre-commit

* [new feature] build group chat agents from library.

* pre-commit

* add authors' info in notebook; add a new notebook for build_from_library; reduce prompt effort

* update test and example for build_from_library

* pre-commit

* add notebook; update docs

* change notebook name

* change description for notebook and doc

* remove default value for default_llm_config

* add embedding similarity agent selection

* pre-commit

* update test

* add dependency installation in github workflow

* update test

* pre-commit

* update notebook

* support directly json as library; support customize embedding model

* update test

* pre-commit

* update github test workflow

* Update autobuild_agent_library.ipynb

* add agent description

* refine prompt; update notebook

* pre-commit

* update test example

* update test

* update test

* update test

* change `config_path` to `config_path_or_env`; update test

* pre-commit

* update test

* update test

* update test: add config_file_location

* change `config_path_or_env` to `config_file_or_env`

* update test

* solve noqa

* fix import error for conftest

* fix test error

* pre-commit

* * update error message in `_create_agent`.
* replace `gpt-4-1106-preview` to `gpt-4` in test file.

* add comment on local server creation; modify notebook; update contrib-openai.yml for test; add autobuild option in setup.py; add autotest model name statement

* move import huggingface_hub to _create_agent

* pre-commit

* add uncover comment in the endpoint creation code block

* recover contrib-openai.yml for merge

---------

Co-authored-by: Jieyu Zhang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Feb 21, 2024
* try to fix blog

* modify blog

* fix test error in #717; fix blog typo in installation; update blogs with output examples.

* pre-commit

* pre-commit

* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx

Co-authored-by: Qingyun Wu <[email protected]>

* add future work

* fix grammar

* update agent_builder

* solve #941; add detailed debug info; support json string config

* pre-commit

* solve #954

* pre-commit

* [new feature] build group chat agents from library.

* pre-commit

* add authors' info in notebook; add a new notebook for build_from_library; reduce prompt effort

* update test and example for build_from_library

* pre-commit

* add notebook; update docs

* change notebook name

* change description for notebook and doc

* remove default value for default_llm_config

* add embedding similarity agent selection

* pre-commit

* update test

* add dependency installation in github workflow

* update test

* pre-commit

* update notebook

* support directly json as library; support customize embedding model

* update test

* pre-commit

* update github test workflow

* Update autobuild_agent_library.ipynb

* add agent description

* refine prompt; update notebook

* pre-commit

* update test example

* update test

* update test

* update test

* change `config_path` to `config_path_or_env`; update test

* pre-commit

* update test

* update test

* update test: add config_file_location

* change `config_path_or_env` to `config_file_or_env`

* update test

* solve noqa

* fix import error for conftest

* fix test error

* pre-commit

* * update error message in `_create_agent`.
* replace `gpt-4-1106-preview` to `gpt-4` in test file.

* add comment on local server creation; modify notebook; update contrib-openai.yml for test; add autobuild option in setup.py; add autotest model name statement

* move import huggingface_hub to _create_agent

* pre-commit

* add uncover comment in the endpoint creation code block

* recover contrib-openai.yml for merge

* remove TERMINATE assertion for sys msg

* remove TERMINATE assertion

---------

Co-authored-by: Jieyu Zhang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
…tion (microsoft#944)

* try to fix blog

* modify blog

* fix test error in microsoft#717; fix blog typo in installation; update blogs with output examples.

* pre-commit

* pre-commit

* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx

Co-authored-by: Qingyun Wu <[email protected]>

* add future work

* fix grammar

* update agent_builder

* solve microsoft#941; add detailed debug info; support json string config

* pre-commit

* solve microsoft#954

* pre-commit

---------

Co-authored-by: Jieyu Zhang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
…ng agent descriptions (microsoft#1039)

* try to fix blog

* modify blog

* fix test error in microsoft#717; fix blog typo in installation; update blogs with output examples.

* pre-commit

* pre-commit

* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx

Co-authored-by: Qingyun Wu <[email protected]>

* add future work

* fix grammar

* update agent_builder

* solve microsoft#941; add detailed debug info; support json string config

* pre-commit

* solve microsoft#954

* pre-commit

* [new feature] build group chat agents from library.

* pre-commit

* add authors' info in notebook; add a new notebook for build_from_library; reduce prompt effort

* update test and example for build_from_library

* pre-commit

* add notebook; update docs

* change notebook name

* change description for notebook and doc

* remove default value for default_llm_config

* add embedding similarity agent selection

* pre-commit

* update test

* add dependency installation in github workflow

* update test

* pre-commit

* update notebook

* support directly json as library; support customize embedding model

* update test

* pre-commit

* update github test workflow

* Update autobuild_agent_library.ipynb

* add agent description

* refine prompt; update notebook

* pre-commit

* update test example

* update test

* update test

* update test

* change `config_path` to `config_path_or_env`; update test

* pre-commit

* update test

* update test

* update test: add config_file_location

* change `config_path_or_env` to `config_file_or_env`

* update test

* solve noqa

* fix import error for conftest

* fix test error

* pre-commit

* * update error message in `_create_agent`.
* replace `gpt-4-1106-preview` to `gpt-4` in test file.

* add comment on local server creation; modify notebook; update contrib-openai.yml for test; add autobuild option in setup.py; add autotest model name statement

* move import huggingface_hub to _create_agent

* pre-commit

* add uncover comment in the endpoint creation code block

* recover contrib-openai.yml for merge

---------

Co-authored-by: Jieyu Zhang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
* try to fix blog

* modify blog

* fix test error in microsoft#717; fix blog typo in installation; update blogs with output examples.

* pre-commit

* pre-commit

* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx

Co-authored-by: Qingyun Wu <[email protected]>

* add future work

* fix grammar

* update agent_builder

* solve microsoft#941; add detailed debug info; support json string config

* pre-commit

* solve microsoft#954

* pre-commit

* [new feature] build group chat agents from library.

* pre-commit

* add authors' info in notebook; add a new notebook for build_from_library; reduce prompt effort

* update test and example for build_from_library

* pre-commit

* add notebook; update docs

* change notebook name

* change description for notebook and doc

* remove default value for default_llm_config

* add embedding similarity agent selection

* pre-commit

* update test

* add dependency installation in github workflow

* update test

* pre-commit

* update notebook

* support directly json as library; support customize embedding model

* update test

* pre-commit

* update github test workflow

* Update autobuild_agent_library.ipynb

* add agent description

* refine prompt; update notebook

* pre-commit

* update test example

* update test

* update test

* update test

* change `config_path` to `config_path_or_env`; update test

* pre-commit

* update test

* update test

* update test: add config_file_location

* change `config_path_or_env` to `config_file_or_env`

* update test

* solve noqa

* fix import error for conftest

* fix test error

* pre-commit

* * update error message in `_create_agent`.
* replace `gpt-4-1106-preview` to `gpt-4` in test file.

* add comment on local server creation; modify notebook; update contrib-openai.yml for test; add autobuild option in setup.py; add autotest model name statement

* move import huggingface_hub to _create_agent

* pre-commit

* add uncover comment in the endpoint creation code block

* recover contrib-openai.yml for merge

* remove TERMINATE assertion for sys msg

* remove TERMINATE assertion

---------

Co-authored-by: Jieyu Zhang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
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

2 participants