You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_agent_builder.py 6.2 kB

Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
Testing AutoBuild (#846) * init notebook for agent set up * complete AgentCreator * AgentCreator first step features completed. * update AgentCreator * update AgentCreator * update AgentCreator (modify params of build) * [update AgentCreator] add auto judgement of coding * add autobuild * rename autobuild notebook * Add step-by-step command. * modify name * fix bugs * update for new openai api * add example * add load_config, save_config, and add task in build and start * modify notebook * rewrite save and load function; update notebook * update description * update description * update description * change member variable of agent_creator.py * update notebook * new feature: auto-generate agent name and system message * new feature: add gpts support * update notebook * update notebook * beautify; add docstring for build * Update notebook; PR version * typo * update notebook * fix typo * try to run llama * try to run llama * switch api_base to base_url * add details for Step 6; add print in clear_all_agents() * Change description of Step 5 * delete ASSISTANT_CONFIG_LIST * add Linxin to blog authors * add blog * Update index.mdx * add test; add user proxy constrain; change show case in notebook * modify blog for test * change test file name; modify test * modify test * modify test * add try/catch for dependency * add version requirement for openai * add exception for DistributionNotFound error * add requirement * change assertion * rename test; modify index.mdx * change config file name * Update agent_chat.md * Update agent_chat.md * Update AgentChat.md * complete blog; fix typos in notebook * add autobuild banner * try to merge * Update Examples.md * update test * skip if openai not installed * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Chi Wang <wang.chi@microsoft.com> * update contrib-openai.yml * change pull_request_target to pull_request * disable other openai tests * address issues from ekzhu; modify notebook; modify blog; modify test * update test example * update test * Update agent_chat.md * Update Examples.md * address issues from qingyun; update agent_builder.py; update notebook * recover contrib-openai.yml * pre-commit solve --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating 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 <qingyun.wu@psu.edu> * 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 <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. #!/usr/bin/env python3 -m pytest
  2. import pytest
  3. import os
  4. import json
  5. import sys
  6. from autogen.agentchat.contrib.agent_builder import AgentBuilder
  7. sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
  8. sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
  9. from conftest import skip_openai as skip # noqa: E402
  10. from test_assistant_agent import OAI_CONFIG_LIST, KEY_LOC # noqa: E402
  11. here = os.path.abspath(os.path.dirname(__file__))
  12. def _config_check(config):
  13. # check config loading
  14. assert config.get("coding", None) is not None
  15. assert config.get("default_llm_config", None) is not None
  16. assert config.get("code_execution_config", None) is not None
  17. for agent_config in config["agent_configs"]:
  18. assert agent_config.get("name", None) is not None
  19. assert agent_config.get("model", None) is not None
  20. assert agent_config.get("description", None) is not None
  21. assert agent_config.get("system_message", None) is not None
  22. @pytest.mark.skipif(
  23. skip,
  24. reason="requested to skip",
  25. )
  26. def test_build():
  27. builder = AgentBuilder(
  28. config_file_or_env=OAI_CONFIG_LIST, config_file_location=KEY_LOC, builder_model="gpt-4", agent_model="gpt-4"
  29. )
  30. building_task = (
  31. "Find a paper on arxiv by programming, and analyze its application in some domain. "
  32. "For example, find a recent paper about gpt-4 on arxiv "
  33. "and find its potential applications in software."
  34. )
  35. agent_list, agent_config = builder.build(
  36. building_task=building_task,
  37. default_llm_config={"temperature": 0},
  38. code_execution_config={
  39. "last_n_messages": 2,
  40. "work_dir": f"{here}/test_agent_scripts",
  41. "timeout": 60,
  42. "use_docker": "python:3",
  43. },
  44. )
  45. _config_check(agent_config)
  46. # check number of agents
  47. assert len(agent_config["agent_configs"]) <= builder.max_agents
  48. @pytest.mark.skipif(
  49. skip,
  50. reason="requested to skip",
  51. )
  52. def test_build_from_library():
  53. builder = AgentBuilder(
  54. config_file_or_env=OAI_CONFIG_LIST, config_file_location=KEY_LOC, builder_model="gpt-4", agent_model="gpt-4"
  55. )
  56. building_task = (
  57. "Find a paper on arxiv by programming, and analyze its application in some domain. "
  58. "For example, find a recent paper about gpt-4 on arxiv "
  59. "and find its potential applications in software."
  60. )
  61. agent_list, agent_config = builder.build_from_library(
  62. building_task=building_task,
  63. library_path_or_json=f"{here}/example_agent_builder_library.json",
  64. default_llm_config={"temperature": 0},
  65. code_execution_config={
  66. "last_n_messages": 2,
  67. "work_dir": f"{here}/test_agent_scripts",
  68. "timeout": 60,
  69. "use_docker": "python:3",
  70. },
  71. )
  72. _config_check(agent_config)
  73. # check number of agents
  74. assert len(agent_config["agent_configs"]) <= builder.max_agents
  75. builder.clear_all_agents()
  76. # test embedding similarity selection
  77. agent_list, agent_config = builder.build_from_library(
  78. building_task=building_task,
  79. library_path_or_json=f"{here}/example_agent_builder_library.json",
  80. default_llm_config={"temperature": 0},
  81. embedding_model="all-mpnet-base-v2",
  82. code_execution_config={
  83. "last_n_messages": 2,
  84. "work_dir": f"{here}/test_agent_scripts",
  85. "timeout": 60,
  86. "use_docker": "python:3",
  87. },
  88. )
  89. _config_check(agent_config)
  90. # check number of agents
  91. assert len(agent_config["agent_configs"]) <= builder.max_agents
  92. @pytest.mark.skipif(
  93. skip,
  94. reason="requested to skip",
  95. )
  96. def test_save():
  97. builder = AgentBuilder(
  98. config_file_or_env=OAI_CONFIG_LIST, config_file_location=KEY_LOC, builder_model="gpt-4", agent_model="gpt-4"
  99. )
  100. building_task = (
  101. "Find a paper on arxiv by programming, and analyze its application in some domain. "
  102. "For example, find a recent paper about gpt-4 on arxiv "
  103. "and find its potential applications in software."
  104. )
  105. builder.build(
  106. building_task=building_task,
  107. default_llm_config={"temperature": 0},
  108. code_execution_config={
  109. "last_n_messages": 2,
  110. "work_dir": f"{here}/test_agent_scripts",
  111. "timeout": 60,
  112. "use_docker": "python:3",
  113. },
  114. )
  115. saved_files = builder.save(f"{here}/example_save_agent_builder_config.json")
  116. # check config file path
  117. assert os.path.isfile(saved_files)
  118. saved_configs = json.load(open(saved_files))
  119. _config_check(saved_configs)
  120. @pytest.mark.skipif(
  121. skip,
  122. reason="requested to skip",
  123. )
  124. def test_load():
  125. builder = AgentBuilder(
  126. config_file_or_env=OAI_CONFIG_LIST, config_file_location=KEY_LOC, builder_model="gpt-4", agent_model="gpt-4"
  127. )
  128. config_save_path = f"{here}/example_test_agent_builder_config.json"
  129. json.load(open(config_save_path, "r"))
  130. agent_list, loaded_agent_configs = builder.load(
  131. config_save_path,
  132. code_execution_config={
  133. "last_n_messages": 2,
  134. "work_dir": f"{here}/test_agent_scripts",
  135. "timeout": 60,
  136. "use_docker": "python:3",
  137. },
  138. )
  139. print(loaded_agent_configs)
  140. _config_check(loaded_agent_configs)
  141. @pytest.mark.skipif(
  142. skip,
  143. reason="requested to skip",
  144. )
  145. def test_clear_agent():
  146. builder = AgentBuilder(
  147. config_file_or_env=OAI_CONFIG_LIST, config_file_location=KEY_LOC, builder_model="gpt-4", agent_model="gpt-4"
  148. )
  149. config_save_path = f"{here}/example_test_agent_builder_config.json"
  150. builder.load(
  151. config_save_path,
  152. code_execution_config={
  153. "last_n_messages": 2,
  154. "work_dir": f"{here}/test_agent_scripts",
  155. "timeout": 60,
  156. "use_docker": "python:3",
  157. },
  158. )
  159. builder.clear_all_agents()
  160. # check if the agent cleared
  161. assert len(builder.agent_procs_assign) == 0
  162. if __name__ == "__main__":
  163. test_build()
  164. test_build_from_library()
  165. test_save()
  166. test_load()
  167. test_clear_agent()