* adapted to openai assistant v2 api
* fix comments
* format code
* fix ci
* Update autogen/agentchat/contrib/gpt_assistant_agent.py
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* PGVector Contrib Initial Commit - KnucklesTeam:autogen:pgvector_contrib fork
* Update website/docs/ecosystem/pgvector.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Updated qdrant installation instructions.
* Fixed openai version.
* Added dependencies to install for qdrant and pgvector in contrib tests.
* Added dependencies to install for qdrant and pgvector in contrib tests.
* Cleaned up dependencies.
* Removed flaml out of setup.py. Used only for notebook example.
* Added PGVector notebook link
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* speed up notebook in CI
* improve notebook
* comment about filter
* bug fix for summary
* bump version to 0.2.26
* restrict openai version
* news update
* add tags in example
* Start Gemini integration: works ok with Text now
* Gemini notebook lint
* try catch "import" for Gemini
* Debug: id issue for chat completion in Gemini
* Add RAG example
* Update docs for RAG
* Fix missing pydash
* Remove temp folder
* Fix test error in runs/7206014032/job/19630042864
* Fix tqdm warning
* Fix notebook output
* Gemini's vision model is supported now
* Install instructions for the Gemini branch
* Catch and retry when see Interval Server Error 500
* Allow gemini to take more flexible messages
i.e., it can take messages where "user" is not the last role.
* Use int time for Gemini client
* Handle other exceptions in gemini call
* rename to "create" function for gemini
* GeminiClient compatible with ModelClient now
* Lint
* Update instructions in Gemini notebook
* Lint
* Remove empty blocks from Gemini notebook
* Add gemini into example page
* self.create instead of call
* Add py and Py into python execution
* Remove error code from merging
* Remove pydash dependency for gemini
* Add cloud-gemini doc
* Remove temp file
* cache import update
* Add test case for summary with mm input
* Lint: warnings instead of print
* Add test cases for gemini
* Gemini test config
* Disable default model for gemini
* Typo fix in gemini workflow
* Correct grammar in example notebook
* Raise if "model" is not provided in create(...)
* Move TODOs into a roadmap
* Update .github/workflows/contrib-tests.yml
Co-authored-by: Davor Runje <davor@airt.ai>
* Gemini test config update
* Update setup.py
Co-authored-by: Davor Runje <davor@airt.ai>
* Update test/oai/test_gemini.py
Co-authored-by: Davor Runje <davor@airt.ai>
* Update test/oai/test_gemini.py
Co-authored-by: Davor Runje <davor@airt.ai>
* Remove python 3.8 from gemini
No google's generativeai for Windows with Python 3.8
* Update import error handling for gemini
* Count tokens and cost for gemini
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Davor Runje <davor@airt.ai>
* Implement user defined functions feature for local cli exec, add docs
* add tests, update docs
* fixes
* fix test
* add pandas test dep
* install test
* provide template as func
* formatting
* undo change
* address comments
* add test deps
* formatting
* test only in 1 env
* formatting
* remove test for local only
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Introducing IOStream
* bug fixing
* polishing
* refactoring
* refactoring
* refactoring
* wip: async tests
* websockets added
* wip
* merge with main
* notebook added
* FastAPI example added
* wip
* merge
* getter/setter to iostream added
* website/blog/2024-03-03-AutoGen-Update/img/dalle_gpt4v.png: convert to Git LFS
* website/blog/2024-03-03-AutoGen-Update/img/gaia.png: convert to Git LFS
* website/blog/2024-03-03-AutoGen-Update/img/teach.png: convert to Git LFS
* add SSL support
* wip
* wip
* exception handling added to on_connect()
* refactoring: default iostream is being set in a context manager
* test fix
* polishing
* polishing
* polishing
* fixed bug with new thread
* polishing
* a bit of refactoring and docs added
* notebook added to docs
* type checking added to CI
* CI fix
* CI fix
* CI fix
* polishing
* obsolete todo comment removed
* fixed precommit error
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Add mypy check in pre-commit
* Add mypy check in pre-commit
* bug fix
* CI fix
* add python version matrix for checking types in CI
* added 3.12 to CI
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.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>
* code executor
* test
* revert to main conversable agent
* prepare for pr
* kernel
* run open ai tests only when it's out of draft status
* update workflow file
* revert workflow changes
* ipython executor
* check kernel installed; fix tests
* fix tests
* fix tests
* update system prompt
* Update notebook, more tests
* notebook
* raise instead of return None
* allow user provided code executor.
* fixing types
* wip
* refactoring
* polishing
* fixed failing tests
* resolved merge conflict
* fixing failing test
* wip
* local command line executor and embedded ipython executor
* revert notebook
* fix format
* fix merged error
* fix lmm test
* fix lmm test
* move warning
* name and description should be part of the agent protocol, reset is not as it is only used for ConversableAgent; removing accidentally commited file
* version for dependency
* Update autogen/agentchat/conversable_agent.py
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
* ordering of protocol
* description
* fix tests
* make ipython executor dependency optional
* update document optional dependencies
* Remove exclude from Agent protocol
* Make ConversableAgent consistent with Agent
* fix tests
* add doc string
* add doc string
* fix notebook
* fix interface
* merge and update agents
* disable config usage in reply function
* description field setter
* customize system message update
* update doc
---------
Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
Co-authored-by: Aaron <aaronlaptop12@hotmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Move contrib-openai.yml
* Moved groupgroupchat
* From #753
* Removed local test references
* Added ignore=test/agentchat/contrib
* Trying to pass contrib-openai tests
* More specific in unit testing.
* Update .github/workflows/contrib-tests.yml
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
* Remove coverage as it is included in test dependencies
* Improved docstring with overview of GraphGroupChat
* Iterate on feedback
* Precommit pass
* user just use pip install pyautogen[graphs]
* Pass precommit
* Pas precommit
* Graph utils an test completed
* Added inversion tests
* Added inversion util
* allow_repeat_speaker can be a list of Agents
* Remove unnessary imports
* Expect ValueError with 1 and 0 agents
* Check that main passes all tests
* Check main
* Pytest all in main
* All done
* pre-commit changes
* noqa E402
* precommit pass
* Removed bin
* Removed old unit test
* Test test_graph_utils
* minor cleanup
* restore tests
* Correct documentation
* Special case of only one agent remaining.
* Improved pytest
* precommit pass
* Delete OAI_CONFIG_LIST_sample copy
* Returns a filtered list for auto to work
* Rename var speaker_order_dict
* To write test cases
* Added check for a list of Agents to repeat
* precommit pass
* Update documentation
* Extract names in allow_repeat_speaker
* Post review changes
* hange "pull_request_target" into "pull_request" temporarily.
* 3 return values from main
* pre-commit changes
* PC edits
* docstr changes
* PC edits
* Rest of changes from main
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Remove unnecessary script files from tracking
* Non empty scripts files from main
* Revert changes in script files to match main branch
* Removed link from website as notebook is removed.
* test/test_graph_utils.py is tested as part of L52 of build.yml
* GroupChat ValueError check
* docstr update
* More clarification in docstr
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* 1.add commit to line138 in groupchat.py;2.fix bug if random choice [];3.return selected_agent if len(graph_eligible_agents) is 1;4.replace all speaker_order to speaker_transitions;5.format
* fix graph_modelling notebook in the last cell
* fix failure in test_groupchat.py
* fix agent out of group to initiate a chat like SocietyOfMind
* add a warning rule in graph_utils to check duplicates in any lists
* refactor allowed_or_disallowed_speaker_transitions to Dict[Agent, List[Agent]] and modify the tests and notebook
* delete Rule 4 in graph_utils and related test case. Add a test to resolve 993fd006e9 (r1460726831)
* fix as the final comments
* modify setup option from graphs to graph and add texts in optional-dependencies.md
* Update autogen/graph_utils.py
---------
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Yishen Sun <freedeaths@FREEDEATHS-XPS>
Co-authored-by: freedeaths <register917@gmail.com>
* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.
* Added the web surfer agent, and related tests.
* Added a notebook to show how WebSurferAgent works.
* Fixed a typo.
* Updated test_web_surfer for compatibility with #1110.
* Updated skip_oai logic.
* Fixed code formatting.
* More pre-commit fixes.
* Added block to contrib-openai.yml
* Added block to contrib-openai.yml
* Added hook for BING_API_KEY
* Temporarily commented out other tests, per request.
* Fixed indentation (maybe?)
* Restoring contrib-openai.yml
* implement redis cache mode, if redis_url is set in the llm_config then
it will try to use this. also adds a test to validate both the existing
and the redis cache behavior.
* PR feedback, add unit tests
* more PR feedback, move the new style cache to a context manager
* Update agent_chat.md
* more PR feedback, remove tests from contrib and have them run with the normal jobs
* doc
* updated
* Update website/docs/Use-Cases/agent_chat.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* update docs
* update docs; let openaiwrapper to use cache object
* typo
* Update website/docs/Use-Cases/enhanced_inference.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* save previous client cache and reset it after send/a_send
* a_run_chat
---------
Co-authored-by: Vijay Ramesh <vijay@regrello.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* set use_docker to default to true
* black formatting
* centralize checking and add env variable option
* set docker env flag for contrib tests
* set docker env flag for contrib tests
* better error message and cleanup
* disable explicit docker tests
* docker is installed so can't check for that in test
* pr comments and fix test
* rename and fix function descriptions
* documentation
* update notebooks so that they can be run with change in default
* add unit tests for new code
* cache and restore env var
* skip on windows because docker is running in the CI but there are problems connecting the volume
* update documentation
* move header
* update contrib tests
* 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>
* added default value to logprobs param
* fixed to work withversions of openai below 1.5.0
* rebase
* fixed openai version in comments
* polishing
* limit openai version to below 1.5.0
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* add function decorator to converasble agent
* polishing
* polishing
* added function decorator to the notebook with async function calls
* added support for return type hint and JSON encoding of returned value if needed
* polishing
* polishing
* refactored async case
* Python 3.8 support added
* polishing
* polishing
* missing docs added
* refacotring and changes as requested
* getLogger
* documentation added
* test fix
* test fix
* added testing of agentchat_function_call_currency_calculator.ipynb to test_notebook.py
* added support for Pydantic parameters in function decorator
* polishing
* Update website/docs/Use-Cases/agent_chat.md
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Update website/docs/Use-Cases/agent_chat.md
Co-authored-by: Li Jiang <bnujli@gmail.com>
* fixes problem with logprob parameter in openai.types.chat.chat_completion.Choice added by openai version 1.5.0
* get 100% code coverage on code added
* updated docs
* default values added to JSON schema
* serialization using json.dump() add for values not string or BaseModel
* added limit to openai version because of breaking changes in 1.5.0
* added line-by-line comments in docs to explain the process
* polishing
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
* bump version to 0.2.1
* remove example link
* update
---------
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
* LMM Code added
* LLaVA notebook update
* Test cases and Notebook modified for OpenAI v1
* Move LMM into contrib
To resolve test issues and deploy issues
In the future, we can install pillow by default, and then move back
LMM agents into agentchat
* LMM test setup update
* try...except... clause for LMM tests
* disable patch for llava agent test
To resolve dependencies issue for build
* Add LMM Blog
* Change docstring for LMM agents
* Docstring update patch
* llava: insert reply at position 1 now
So, it can still handle human_input_mode
and max_consecutive_reply
* Resolve comments
Fixing: typos, blogs, yml, and add OpenAIWrapper
* Signature typo fix for LMM agent: system_message
* Update LMM "content" from latest OpenAI release
Reference https://platform.openai.com/docs/guides/vision
* update LMM test according to latest OpenAI release
* Fully support GPT-4V now
1. Add a notebook for GPT-4V. LLava notebook also updated.
2. img_utils updated
3. GPT-4V formatter now return base64 image with mime type
4. Infer mime type directly from b64 image content (while loading
without suffix)
5. Test cases modified according to all the related changes.
* GPT-4V link updated in blog
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Initial commit.
* Disable LLM response caching.
* Add teachability option to setup.py
* Modify test to use OAI_CONFIG_LIST as suggested in the docs.
* Expand unit test.
* Complete unit test.
* Add filter_dict
* details
* AnalysisAgent
* details
* More documentation and debug output.
* Support retrieval of any number of relevant memos, including zero.
* More robust analysis separator.
* cleanup
* teach_config
* refactoring
* For robustness, allow more flexibility on memo storage and retrieval.
* de-dupe the retrieved memos.
* Simplify AnalysisAgent. The unit tests now pass with gpt-3.5
* comments
* Add a verbosity level to control analyzer messages.
* refactoring
* comments
* Persist memory on disk.
* cleanup
* Use markdown to format retrieved memos.
* Use markdown in TextAnalyzerAgent
* Add another verbosity level.
* clean up logging
* notebook
* minor edits
* cleanup
* linter fixes
* Skip tests that fail to import openai
* Address reviewer feedback.
* lint
* refactoring
* Improve wording
* Improve code coverage.
* lint
* Use llm_config to control caching.
* lowercase notebook name
* Sort out the parameters passed through to ConversableAgent, and supply full docstrings for the others.
* lint
* Allow TextAnalyzerAgent to be given a different llm_config than TeachableAgent.
* documentation
* Modifications to run openai workflow.
* Test on just python 3.10.
Replace agent with agent teachable_agent as recommended.
* Test on python 3.9 instead of 3.10.
* Remove space from name -> teachableagent
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Add custom embedding function
* Add support to custom vector db
* Improve docstring
* Improve docstring
* Improve docstring
* Add support to customized is_termination_msg fucntion
* Add a test for customize vector db with lancedb
* Fix tests
* Add test for embedding_function
* Update docstring
* FORMATTING
* UPDATE - OAI __init__.py
* ruff
* ADD - notebook covering oai API configuration options and their different purposes
* ADD openai util updates so that the function just assumes the same environment variable name for all models, also added functionality for adding API configurations like api_base etc.
* ADD - updates to config_list_from_dotenv and tests for openai_util testing, update example notebook
* UPDATE - added working config_list_from_dotenv() with passing tests, and updated notebook
* UPDATE - code and tests to potentially get around the window build permission error, used different method of producing temporary files
---------
Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
* Replace `assert`s in the `conversable_agent` module with `if-log-raise`.
* Use a `logger` object in the `code_utils` module.
* Replace use of `assert` with `if-log-raise` in the `code_utils` module.
* Replace use of `assert` in the `math_utils` module with `if-not-raise`.
* Replace `assert` with `if` in the `oai.completion` module.
* Replace `assert` in the `retrieve_utils` module with an if statement.
* Add missing `not`.
* Blacken `completion.py`.
* Test `generate_reply` and `a_generate_reply` raise an assertion error
when there are neither `messages` nor a `sender`.
* Test `execute_code` raises an `AssertionError` when neither code nor
filename is provided.
* Test `split_text_to_chunks` raises when passed an invalid chunk mode.
* * Add `tiktoken` and `chromadb` to test dependencies as they're used in
the `test_retrieve_utils` module.
* Sort the test requirements alphabetically.
* UPDATE - Updated retrieve_utils.py to have the ability to parse text from pdf files
* UNDO - change to recursive condition
* UPDATE - updated agentchat_RetrieveChat.ipynb to clarify which file types are accepted to be in the docs path
* ADD - missing import
* UPDATE - setup.py to have PyPDF2 in retrievechat
* RE-ADD - urls
* ADD - tests for retrieve utils, and removed deprecated PyPdf2
* Update agentchat_RetrieveChat.ipynb
* Update retrieve_utils.py
Fix format
* Update retrieve_utils.py
Replace print with logger
* UPDATE - added more specific exception to PDF decryption try/catch
* FIX - typo, return statement at wrong indentation in extract_text_from_pdf
---------
Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>