## What
This modification asks the user to explicitly mention the model used in their experiments.
## Why
Frequently, many issues can be better understood by reviewing the model used. For example, small models have limitations in their ability to generate code in code blocks or follow complex instructions leading to errors.
* Change defualt model for `lmm`
* Try to use PIL image for LMM's _oai_messages
* Update test cases and llava
* Remove redundant files
* Update the imports for lmm tests
* Test case fix
* Docstring update
* LMM notebook lint
* Typo correction for img_utils and its test
* Fix self.client bug for Dalle Agent
The self.client member variable is reserved for OpenAI's LLM-compatible
client, which requires usage summary support.
So, we rename self.client to self._dalle_client to resolve this issue
* make default model of a constant class variable
* make default model of a constant class variable
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Initialization of fsm blog
* Pre-commit pass
* Pinyin name correction
* Updated title
* Updated title
* Added summary of notebook and note about DAG
* Update index.mdx
* Update website/blog/2024-02-11-FSM-GroupChat/index.mdx
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/blog/2024-02-11-FSM-GroupChat/index.mdx
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Removed outdated filename and followed SoM notebook format
* Pre-commit pass
* Update notebook link
* Corrected link to rendered notebook
* Removed agentchat_hierarchy_flow_using_select_speaker and modified agentchat_groupchat_finite_state_machine
* Add notebook/agentchat_groupchat_finite_state_machine.ipynb to paths
---------
Co-authored-by: freedeaths <register917@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Prints the version of AutoGenBench from the command line, closing i1458
* Added autogenbench version to timestamp.txt
* Attempting to fix formatting.
* Add a gitignore for autogenbench
* Generalize to read all template dirs from Templates
* AutoGenBench logs telemetry when available.
* Remove spaces if present from template names.
* Bump version.
* Fixed formatting.
* Allow native warning to be skipped. Mount autogen repo in Docker if it can be found (experimental).
* Native execution now occurs in a venv.
* Bump version.
* Fixed a prompt escaping bug evident in GAIA task '6f37996b-2ac7-44b0-8e68-6d28256631b4'
* Updated all scenarios to use template discovery.
* Update with main version of runtime_logging.
---------
Co-authored-by: gagb <gagb@users.noreply.github.com>
* Allow the GroupChatManager to send introductions.
* Fixed function name.
* Added test cases for sending introductions.
* Trying to sort out why remote pytest is failing.
* Fixed broken plugin behavior.
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Updated as per Chi's suggestions.
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* support getting model from both llm config and config list
* address comments
* address commentsd
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* checkpoint async based
* Implement jupyter client and use jupyer gateway
* update deps
* address comments
* add missing parenthesis
* Update build.yml
* CI fixes
* change requirement name
* debug
* print stderr
* dont seek
* show token
* mitigaton for windows bug
* use hex token to avoid - in token
* formatting
* put back in place original while the windows bug exists
* lint
* Update autogen/coding/jupyter_code_executor.py
* Update jupyter_code_executor.py
* Update test_embedded_ipython_code_executor.py
* Update setup.py
* Update build.yml
* fix nameerror
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Update code_utils.py
Updated the powershell command to pwsh
* Update code_utils.py
added a split to handle powershell in the first condition as well
* Update local_commandline_code_executor.py
added "pwsh" as a command option in lang variable
* Update autogen/coding/local_commandline_code_executor.py
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Update code_utils.py
* Update code_utils.py
fixed formatting
* Update code_utils.py
defined a function to detect whether 'powershell' or 'pwsh' works and accordingly use the one that works
* Update code_utils.py
fixed formatting
* Update and rename test_code.py to test_code_utils.py
added a unit test for get_powershell_command function in code_utils.py
* Update test_code_utils.py
fixed formatting
* Update test_code_utils.py
fixed formatting
* Update autogen/code_utils.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* solved issue #1747
* updated unit test
* fixed formatting
* fixed formatting
* fixed formatting
* fixed a bug
* removed extra return None and removed redundant comments
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* 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
* remove TERMINATE assertion for sys msg
* remove TERMINATE assertion
---------
Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
* Allow None for sender field
* Apply formatting fixes
* Add test for ConversableAgent generate_reply with message is provided and sender is None
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* refactored code to simplify
* optimize function. Instead of iterating over each character, guess at size and then iterate by token.
* adding tests
* Add missing tests
* minor test fix
* simplified token truncation by using tiktoken to encode and decode
* updated truncated notification message
* Fix llm_config spec to use os.environ
* Add test case and fix bug in loop
---------
Co-authored-by: gagb <gagb@users.noreply.github.com>
* Update code_utils.py
Updated the powershell command to pwsh
* Update code_utils.py
added a split to handle powershell in the first condition as well
* Update local_commandline_code_executor.py
added "pwsh" as a command option in lang variable
* Update autogen/coding/local_commandline_code_executor.py
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Update code_utils.py
* Update code_utils.py
fixed formatting
* Update code_utils.py
defined a function to detect whether 'powershell' or 'pwsh' works and accordingly use the one that works
* Update code_utils.py
fixed formatting
* Update and rename test_code.py to test_code_utils.py
added a unit test for get_powershell_command function in code_utils.py
* Update test_code_utils.py
fixed formatting
* Update test_code_utils.py
fixed formatting
* Update autogen/code_utils.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* UPDATE - add commandline sanitation class, update local_commandline_code_executor.py and renamed test for code_utils.py
* FIX - precommit run
* UPDATE - moved sanitation function to LocalCommandlineCodeExecutor, moved testo to test_commandline_code_executor.py
* UPDATE - added docstring notice to sanitize_code
* Update autogen/coding/local_commandline_code_executor.py
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* FIX - regular expression
* FIX - function invocation in tests
* UPDATE - pre-commit run
* FIX - pre-commit run -_-
---------
Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Change defualt model for `lmm`
* Try to use PIL image for LMM's _oai_messages
* Update test cases and llava
* Remove redundant files
* Update the imports for lmm tests
* Test case fix
* Docstring update
* LMM notebook lint
* Typo correction for img_utils and its test
* Update test_llava.py
debug, reformat
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
Co-authored-by: Shaokun Zhang <shaokun.zhang@psu.edu>
* update example page
* Update website/docs/Examples.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* implements features
* fix docstring
* adds test
* resolve some comments
* remove unused group chat manager from test
* list implementation
* better naming
* resolve comments
* adds one more test
* checks case when agent doesnt exist
* clean up
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* support azure assistant api
* try to add azure testing
* improve testing
* fix testing
* fix code
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Validate llm_config passed to ConversableAgent
Based on #1522, this commit implements the additional validation checks in
`ConversableAgent.`
Add the following validation and `raise ValueError` if:
- The `llm_config` is `None`.
- The `llm_config` is valid, but `config_list` is missing or lacks elements.
- The `config_list` is valid, but no `model` is specified.
The rest of the changes are code churn to adjust or add the test cases.
* Validate llm_config passed to ConversableAgent
Based on #1522, this commit implements the additional validation checks in
`ConversableAgent.`
Add the following validation and `raise ValueError` if:
- The `llm_config` is `None` (validated in `ConversableAgent`).
- The `llm_config` has no `model` specified and `config_list` is empty
(validated in `OpenAIWrapper`).
- The `config_list` has at least one entry, but not all the entries have
the `model` is specified (validated in `OpenAIWrapper`).
The rest of the changes are code churn to adjust or add the test cases.
* Validate llm_config passed to ConversableAgent
Based on #1522, this commit implements the additional validation checks in
`ConversableAgent.`
Add the following validation and `raise ValueError` if:
- The `llm_config` is `None` (validated in `ConversableAgent`).
- The `llm_config` has no `model` specified and `config_list` is empty
(validated in `OpenAIWrapper`).
- The `config_list` has at least one entry, but not all the entries have
the `model` is specified (validated in `OpenAIWrapper`).
The rest of the changes are code churn to adjust or add the test cases.
* Validate llm_config passed to ConversableAgent
Based on #1522, this commit implements the additional validation checks in
`ConversableAgent.`
Add the following validation and `raise ValueError` if:
- The `llm_config` is `None` (validated in `ConversableAgent`).
- The `llm_config` has no `model` specified and `config_list` is empty
(validated in `OpenAIWrapper`).
- The `config_list` has at least one entry, but not all the entries have
the `model` is specified (validated in `OpenAIWrapper`).
The rest of the changes are code churn to adjust or add the test cases.
* Validate llm_config passed to ConversableAgent
Based on #1522, this commit implements the additional validation checks in
`ConversableAgent.`
Add the following validation and `raise ValueError` if:
- The `llm_config` is `None` (validated in `ConversableAgent`).
- The `llm_config` has no `model` specified and `config_list` is empty
(validated in `OpenAIWrapper`).
- The `config_list` has at least one entry, but not all the entries have
the `model` is specified (validated in `OpenAIWrapper`).
The rest of the changes are code churn to adjust or add the test cases.
* Fix the test_web_surfer issue
For anyone reading this: you need to `pip install markdownify` for the
`import WebSurferAgent` to succeed. That is needed to run the
`test_web_surfer.py` locally.
Test logic needs `llm_config` that is not `None` and that is not
`False`.
Let us pray that this works as part of GitHub actions ...
* One more fix for llm_config validation contract
* WIP:logging
* serialize request, response and client
* Fixed code formatting.
* Updated to use a global package, and added some test cases. Still very-much a draft.
* Update work in progress.
* adding cost
* log new agent
* update log_completion test in test_agent_telemetry
* tests
* fix formatting
* Added additional telemetry for wrappers and clients.
* WIP: add test for oai client and oai wrapper table
* update test_telemetry
* fix format
* More tests, update doc and clean up
* small fix for session id - moved to start_logging and return from start_logging
* update start_logging type to return str, add notebook to demonstrate use of telemetry
* add ability to get log dataframe
* precommit formatting fixes
* formatting fix
* Remove pandas dependency from telemetry and only use in notebook
* formatting fixes
* log query exceptions
* fix formatting
* fix ci
* fix comment - add notebook link in doc and fix groupchat serialization
* small fix
* do not serialize Agent
* formatting
* wip
* fix test
* serialization bug fix for soc moderator
* fix test and clean up
* wip: add version table
* fix test
* fix test
* fix test
* make the logging interface more general and fix client model logging
* fix format
* fix formatting and tests
* fix
* fix comment
* Renaming telemetry to logging
* update notebook
* update doc
* formatting
* formatting and clean up
* fix doc
* fix link and title
* fix notebook format and fix comment
* format
* try fixing agent test and update migration guide
* fix link
* debug print
* debug
* format
* add back tests
* fix tests
---------
Co-authored-by: Adam Fourney <adamfo@microsoft.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Validate the OpenAI API key format
Increase the amount of internal validation for OpenAI API keys. The intent is
to shorten the debugging loop in case of typos. The changes do *not* add
validation for Azure OpenAI API keys.
* Add the validation in `__init__` of `OpenAIClient`.
* Introduce the `MOCK_OPEN_AI_API_KEY` constant for testing.
* Add unit test coverage for the `is_valid_api_key` function.
* Validate the OpenAI API key format
Increase the amount of internal validation for OpenAI API keys. The intent is
to shorten the debugging loop in case of typos. The changes do *not* add
validation for Azure OpenAI API keys.
* Add the validation in `__init__` of `OpenAIClient`.
* Introduce the `MOCK_OPEN_AI_API_KEY` constant for testing.
*Add unit test coverage for the `is_valid_api_key` function.
* Log a warning when register a default client fails.
* Validate the OpenAI API key format
Increase the amount of internal validation for OpenAI API keys. The intent is
to shorten the debugging loop in case of typos. The changes do *not* add
validation for Azure OpenAI API keys.
* Add the validation in `__init__` of `OpenAIClient`. We'll log a
warning when the OpenAI API key isn't valid.
* Introduce the `MOCK_OPEN_AI_API_KEY` constant for testing.
* Add unit test coverage for the `is_valid_api_key` function.
* Check for OpenAI base_url before API key validation
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>