* Feat/headless browser (retargeted) (#1832)
* Add headless browser to the WebSurferAgent, closes#1481
* replace soup.get_text() with markdownify.MarkdownConverter().convert_soup(soup)
* import HeadlessChromeBrowser
* implicitly wait for 10s
* inicrease max. wait time to 99s
* fix: trim trailing whitespace
* test: fix headless tests
* better bing query search
* docs: add example 3 for headless option
---------
Co-authored-by: Vijay Ramesh <vijay@regrello.com>
* Handle missing Selenium package.
* Added browser_chat.py example to simplify testing.
* Based browser on mdconvert. (#1847)
* Based browser on mdconvert.
* Updated web_surfer.
* Renamed HeadlessChromeBrowser to SeleniumChromeBrowser
* Added an initial POC with Playwright.
* Separated Bing search into it's own utility module.
* Simple browser now uses Bing tools.
* Updated Playwright browser to inherit from SimpleTextBrowser
* Got Selenium working too.
* Renamed classes and files for consistency.
* Added more instructions.
* Initial work to support other search providers.
* Added some basic behavior when the BING_API_KEY is missing.
* Cleaned up some search results.
* Moved to using the request.Sessions object. Moved Bing SERP paring to mdconvert to be more broadly useful.
* Added backward compatibility to WebSurferAgent
* Selenium and Playwright now grab the whole DOM, not jus the body, allowing the converters access to metadata.
* Fixed printing of page titles in Playwright.
* Moved installation of WebSurfer dependencies to contrib-tests.yml
* Fixing pre-commit issues.
* Reverting conversable_agent, which should not have been changed in prior commit.
* Added RequestMarkdownBrowser tests.
* Fixed a bug with Bing search, and added search test cases.
* Added tests for Bing search.
* Added tests for md_convert
* Added test files.
* Added missing pptx.
* Added more tests for WebSurfer coverage.
* Fixed guard on requests_markdown_browser test.
* Updated test coverage for mdconvert.
* Fix brwser_utils tests.
* Removed image test from browser, since exiftool isn't installed on test machine.
* Removed image test from browser, since exiftool isn't installed on test machine.
* Disable Selenium GPU and sandbox to ensure it runs headless in Docker.
* Added option for Bing API results to be interleaved (as Bing specifies), or presented in a categorized list (Web, News, Videos), etc
* Print more details when requests exceptions are thrown.
* Added additional documentation to markdown_search
* Added documentation to the selenium_markdown_browser.
* Added documentation to playwright_markdown_browser.py
* Added documentation to requests_markdown_browser
* Added documentation to mdconvert.py
* Updated agentchat_surfer notebook.
* Update .github/workflows/contrib-tests.yml
Co-authored-by: Davor Runje <davor@airt.ai>
* Merge main. Resolve conflicts.
* Resolve pre-commit checks.
* Removed offending LFS file.
* Re-added offending LFS file.
* Fixed browser_utils tests.
* Fixed style errors.
---------
Co-authored-by: Asapanna Rakesh <45640029+INF800@users.noreply.github.com>
Co-authored-by: Vijay Ramesh <vijay@regrello.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Davor Runje <davor@airt.ai>
* Remove deps on RetrieveAssistantAgent for getting human input
* Terminate when no more context
* Add deprecation warning message
* Clean up RetrieveAssistantAgent, part 1
* Update version
* Clean up docs and notebooks
* [Typo] Update MongoDB Notebook to acknlowedge >=M10 support
The notebook instructions state we support only >=M30 clusters for AutoGen. This is slightly misleading. We support >=M10 clusters or any cluster that allows for index creation from client code. This support is continually updating so this PR updates the language to reflect that.
* Add link!
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
* +mdb atlas
* Update test/agentchat/contrib/vectordb/test_mongodb.py
Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
* update test_mongodb.py; we dont need to do the assert .collection_name vs .name
* Try fix mongodb service
* Try fix mongodb service
* Update username and password
* Update autogen/agentchat/contrib/vectordb/mongodb.py
* closer --- but im not super thrilled about the solution...
* PYTHON-4506 Expanded tests and simplified vector search pipelines
* Update mongodb.py
* Update mongodb.py - Casey
* search_index_magic
index_name change; keeping track of lucene indexes is tricky
* Fix format
* Fix tests
* hacking trying to figure this out
* Streamline checks for indexes in construction and restructure tests
* Add tests for score_threshold, embedding inclusion, and multiple query tests
* refactored create_collection to meet base object requirements
* lint
* change the localhost port to 27017
* add test to check that no embedding is there unless explicitly provided
* Update logger
* Add test get docs with ids=None
* Rename and update notebook
* have index management include waiting behaviors
* Adds further optional waits or users and tests. Cleans up upsert.
* ensure the embedding size for multiple embedding inputs is equal to dimensions
* fix up tests and add configuration to ensure documents and indexes are READY for querying
* fix import failure
* adjust typing for 3.9
* fix up the notebook output
* changed language to communicate time taken on first init_chat call
* replace environment variable usage
---------
Co-authored-by: Fabian Valle <fabian.valle-simmons@mongodb.com>
Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Casey Clements <casey.clements@mongodb.com>
Co-authored-by: Jib <jib.adegunloye@mongodb.com>
Co-authored-by: Jib <Jibzade@gmail.com>
Co-authored-by: Cozypet <yanhan860711@gmail.com>
* Update Autobuild.
* merge main into autobuild
* update test for new autobuild
* update author info
* fix pre-commit
* Update autobuild notebook
* Update autobuild_agent_library.ipynb
* Update autobuild_agent_library.ipynb
* Fix pre-commit failures.
---------
Co-authored-by: Linxin Song <rm.social.song1@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Calculate the dimension size based off model chosen.
* Added example docstring.
* Validated working notebook with sentence models of different dimensions.
* Validated removal of model_name working.
* Second example uses conn object.
* embedding_function no longer directly references .encode
* Fixed pre-commit issue.
* Use try/except to raise error when shape is not found in embedding function.
* Re-ran notebook.
* Update autogen/agentchat/contrib/vectordb/pgvectordb.py
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Update autogen/agentchat/contrib/vectordb/pgvectordb.py
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Added .encode
* Removed example comment.
* Fix overwrite doesn't work with existing collection when custom embedding function has different dimension from default one
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
* white spaces
* add llamaindex agent wrapper for autogen
* formatting
* formatting fixes
* add support for llamaindex agents
* fix style
* fix style
* delete file
* re-add file
* fixes pre-commit errors
* feat: Add agentchat_group_chat_with_llamaindex_agents notebook
This commit adds the notebook "agentchat_group_chat_with_llamaindex_agents.ipynb" which demonstrates how to integrate Llamaindex agents into Autogen. The notebook includes code for setting up the API endpoint, creating Llamaindex agents, and setting up a group chat.
* Refactor code
* feat: Add test for LLamaIndexConversableAgent
This commit adds a new test file `test_llamaindex_conversable_agent.py` that contains a test case for the `LLamaIndexConversableAgent` class. The test verifies the functionality of group chat with two MultimodalConversable Agents, limiting the chat by the `max_round` parameter. It also checks if the number of rounds does not exceed the maximum specified rounds.
The purpose of this change is to ensure that the `LLamaIndexConversableAgent` behaves as expected and correctly handles group chats with limited rounds.
Note: This commit includes import statements and setup code necessary for running the test case.
* fix formatting
* feat: Add LlamaIndexAgent job to GitHub Actions workflow
This commit adds a new job called "LlamaIndexAgent" to the GitHub Actions workflow. The job runs on multiple operating systems (ubuntu-latest, macos-latest, windows-2019) and uses Python version 3.11. It sets up the Python environment, installs necessary packages and dependencies for LMM, performs coverage testing using pytest, and uploads the coverage report to Codecov.
The commit also includes changes to the test_llamaindex_conversable_agent.py file. It imports os and sys modules, appends a path to sys.path, and adds skip conditions for tests based on certain conditions.
These changes improve the CI/CD pipeline by adding a new job for LlamaIndexAgent and enhancing test conditions in test_llamaindex_conversable_agent.py.
* fix test yaml
* cleanup tests
* fix test run
* formatting
* add test
* fix yaml
* pr feedback
* add documentation to website
* fixed style
* edit to document page
* newline
* make skip reason easier to see
* compose skip reasons
* fix env variable name
* refactor: Update package installation in contrib workflows
- Replaced specific package installations with more general ones
- Updated the installation of llama-index packages and dependencies
- Added new packages for llama-index and Wikipedia tools
* Update dependencies and add new agents for group chat
- Update dependencies to specific versions
- Add new agent `entertainent_specialist` for discovering entertainment opportunities in a location
- Modify the `test_group_chat_with_llama_index_conversable_agent` function to include the new agent in the group chat
* Update pydantic version requirement in setup.py
- Update pydantic version requirement from "pydantic>=1.10,<3,!=2.6.0" to "pydantic>=1.10,<3"
- Remove comment about issue with pydantic 2.6.0
* Refactor ChatMessage instantiation in _extract_message_and_history()
- Refactored the instantiation of ChatMessage in the _extract_message_and_history() function.
- Added an empty dictionary as additional_kwargs to the ChatMessage constructor.
* Refactor test_llamaindex_conversable_agent.py
- Removed unused import and variable
- Updated OpenAI model to gpt-4
- Reduced max_iterations for location_specialist and entertainment_specialist from 30 to 5
- Changed human_input_mode for user_proxy to "NEVER"
- Added assertion for max_rounds in entertainent_assistant
These changes improve code efficiency and ensure proper functionality.
* Remove entertainment_specialist agent and update user_proxy settings in test_llamaindex_conversable_agent.py
- Remove the creation of entertainent_specialist agent
- Update the max_consecutive_auto_reply setting for user_proxy to 10
- Update the default_auto_reply setting for user_proxy to "Thank you. TERMINATE"
* Refactor installation of LlamaIndex packages and dependencies
- Simplify installation commands for LlamaIndex packages
- Remove specific version numbers from pip install commands
* Update test_llamaindex_conversable_agent.py to include verbose output during pytest.
- Add the -v flag to the pytest command in contrib-openai.yml.
- Print a message when skipping the test due to missing dependencies or key.
* Refactor OpenAI workflow, remove LlamaIndexAgent
This commit removes the LlamaIndexAgent from the OpenAI workflow in order to streamline and simplify the code. The LlamaIndexAgent was no longer necessary and its removal improves overall code organization and maintainability.
* feat: Add test for group chat functionality with LLamaIndexConversableAgent
use mock reactagent in test
* Update Dockerfile for devcontainer
- Updated the Dockerfile for the devcontainer environment.
- Added installation of build-essential, npm, git-lfs, and other packages.
- Upgraded pip and installed pydoc-markdown, pyyaml, and colored libraries.
* Update devcontainer.json with new VS Code extensions and terminal settings
- Updated the list of VS Code extensions in devcontainer.json to include "GitHub.copilot"
- Added a new terminal profile for Linux with the path set to "/bin/bash"
- Set the default Linux terminal profile to "bash"
* removeall
* feat: Add Dockerfiles and devcontainer configurations
This commit adds Dockerfiles and devcontainer configurations for different use cases in the `.devcontainer` directory. The following changes were made:
- Added `Dockerfile` for basic setups (`base`)
- Added `Dockerfile` for advanced features (`full`)
- Added `Dockerfile` for AutoGen project developers (`dev`)
- Added `Dockerfile` for AutoGen project developers using Studio (`studio`)
- Updated existing files with necessary dependencies and configurations
- Modified README.md to provide instructions on customizing Dockerfiles and managing the Docker environment
These changes allow users to easily set up their AutoGen development environment using Docker containers.
* delete
* Add authors.yml file with author information
This commit adds the authors.yml file, which contains information about various authors contributing to the project. Each author entry includes their name, title, URL, and image URL. This file will be used to display author information on the website.
* delete
* Add test cases for agent chat functionality
This commit adds new test cases for the agent chat functionality. The test cases include scenarios such as auto feedback from code execution, function calls, currency calculator, async function calls, group chat finite state machine, cost token tracking, and group chat state flow. These test cases cover different versions of Python (3.10, 3.11, and 3.12) and are skipped if OpenAI is not installed or the Python version does not match.
* delete
* feat: Add LLM configuration documentation
This commit adds documentation for configuring an agent's access to LLMs. It includes information on the `llm_config` argument, `config_list`, and other configuration parameters. The commit also provides examples of filtering the `config_list` based on model names and tags. Additionally, it demonstrates how to add an HTTP client in `llm_config` for proxy usage. Finally, it mentions helper functions for loading a config list from API keys, environment variables, files, or `.env` files.
Closes#1234
* delete
* feat: Add LLM configuration documentation
This commit adds documentation for configuring an agent's access to LLMs. It includes information on the `llm_config` argument, `config_list`, and other configuration parameters. The commit also provides examples of filtering the `config_list` based on model names and tags. Additionally, it demonstrates how to add an HTTP client in `llm_config` for proxy usage. Finally, it mentions helper functions for loading a config list from various sources.
Closes#1234
* delete
* adding back notebooks
* reset
* feat: Add setup.py for package installation
This commit adds a new file, `setup.py`, which is used for installing the package. The `setup.py` file includes information such as the author, description, and dependencies of the package. This allows users to easily install and use the package in their projects.
The `setup.py` file also includes different extra requirements for specific functionalities, such as retrieving chat data or running Jupyter notebooks. These extra requirements are installed when specified during installation.
Overall, this addition improves the usability and installation process of the package.
* Resolving test failures locally
* Resolving test failures locally
* Updates to website resources and docs, author
* Adding image
* Fixes to precommit and doc files for lfd
* Fixing ruff exclusion of new notebook
* Updates to support notebook rendering
* Updates to support notebook rendering
* Removing some results to try to fix docs render issue
* pre-commit to standardize formatting
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Added fixes and tests for basic auth format
* User can provide their own connection object. Added test for it.
* Updated instructions on how to use. Fully tested all 3 authentication methods successfully.
* Get password from gitlab secrets.
* Hide passwords.
* Update notebook/agentchat_pgvector_RetrieveChat.ipynb
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Hide passwords.
* Added connection_string test. 3 tests total for auth.
* Fixed quotes on db config params. No other changes found.
* Ran notebook
* Ran pre-commits and updated setup to include psycopg[binary] for windows and mac.
* Corrected list extension.
* Separate connection establishment function. Testing pending.
* Fixed pgvectordb auth
* Update agentchat_pgvector_RetrieveChat.ipynb
Added autocommit=True in example
* Rerun notebook
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
* improved deprecation warnings
* compressible_agent test fix
* fix retrieve chat history test
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* added logger param for custom logger support
* added FileLogger
* bump: spell check
* bump: import error
* added more log functionalites
* bump: builtin logger for FileLogger
* type check and instance level logger
* tests added for the fileLogger
* formatting bump
* updated tests and removed time formatting
* separate module for the filelogger
* update file logger test
* added the FileLogger into the notebook
* bump json decode error
* updated requested changes
* Updated tests with AutoGen agents
* bump file
* bump: logger accessed before intializedsolved
* Updated notebook to guide with a filename
* added thread_id to the FileLogger
* bump type check in tests
* Updated thread_id for each log event
* Updated thread_id for each log event
* Updated with tempfile
* bump: str cleanup
* skipping-windows tests
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* first pass at offline agent eval integration
* Integrating AgentEval for offline scenarios
* removing old changes
* fixing notebook, updating docs
* fixing subcriteria bug
* updating class comment
* cleaning up agent constructors
* moving AgentEval agents to separate folder and adding a brief README
* fixing build breaks
* fixing formatting break
* fixing comments
* consolidating files in the agenteval folder under contrib and cleaning up imports
* fixing import ordering
* adding basic agenteval tests and fixing criteria parsing bug
* first try at adding openai agenteval tests to build process
* adding non-openai agenteval tests to build process
* updating test settings
* updating openai test
* Update test/agentchat/contrib/agent_eval/test_agent_eval.py
Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>
* Update .github/workflows/contrib-openai.yml
Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>
* test commit
* updating typing and converting to pydantic objects
* fixing test file
---------
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>
* Function Calling with GPTAssistantAgent
* Add Link to Notebook in Website
* Add metadata to the notebook
* formatting of H2 and H3 text
* updated to new method of function calling
* Run Pre-commit
* utilize get_function_schema
* Add minimum token threshold in MessageHistoryLimiter
* Update transforms tests for the threshold
* Move min_threshold_tokens from Message to Token Limiter
* Optimize _check_tokens_threshold
Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>
* Apply requested changes (renaming, phrasing, validations)
* Fix format
* Fix _check_tokens_threshold logic
* Update docs and notebook
* Improve phrasing
* Add min_tokens example in notebook
* Add min_tokens example in website docs
* Add min_tokens example in notebook
* Update website docs to be in sync with get_logs change
---------
Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>