* 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>
* add couchbase vector store
* add unit test
* cleanup
* add couchbase to website
* fix code formatting
---------
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
* Initial commit with ability to add name into content with a transform
* Transforms documentation
* Fix transform links in documentation
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
* intial commit for aws-bedrock
* format
* converse setup for model req-response
* Renamed to bedrock.py, updated parameter parsing, system message extraction, client class incorporation
* Established Bedrock class based on @astroalek and @ChristianT's code, added ability to disable system prompt separation
* Image parsing and removing access credential checks
* Added tests, added additional parameter support
* Amazon Bedrock documentation
* Moved client parameters to init, align parameter names with Anthropic, spelling fix, remove unnecessary imports, use base and additional parameters, update documentation
* Tidy up comments
* Minor typo fix
* Correct comment re aws_region
---------
Co-authored-by: Mark Sze <mark@sze.family>
Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Initial commit with ability to add transforms to GroupChat
* Added tests
* Tidy up
* Tidy up of variable names and commented out test
* Tidy up comment
* Update import to relative
* Added documentation topic for transform messages for speaker selection.
* Added handling of non-core module, transforms, in groupchat
* Adjusted parameter if module not loaded.
* Updated groupchat test which failed during CI/CD
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Update to ensure name on initial messages
* Corrected test cases for messages now including names.
* Added name to messages within select speaker nested chat
* Corrected select speaker group chat tests for name field
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update Mistral client class to support new Mistral v1.0.1 package
* Remove comments
* Refactored assistant/system role order, tidied imports and comments
---------
Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
* 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
* fix: message history limiter to support tool calls
* add: pytest and docs for message history limiter for tool calls
* Added keep_first_message for HistoryLimiter transform
* Update to inbetween to between
* Updated keep_first_message to non-optional, logic for history limiter
* Update transforms.py
* Update test_transforms to match utils introduction, add keep_first_message testing
* Update test_transforms.py for pre-commit checks
---------
Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* bump version
* update
* format
---------
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
Co-authored-by: Yiran Wu <32823396+yiranwu0@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Add gpt-4o-mini to model list
* Fix formatting issue and verify with pre-commit
* Remove extra space
* Minor change to make pre-commit (formatting checks) pass
---------
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
Co-authored-by: Ian <ArGregoryIan@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>
* switch to officially supported Vertex AI message sending + safety setting converion for vertexai
* add system instructions
* switch to officially supported Vertex AI message sending + safety setting converion for vertexai
* fix bug in safety settings conversion
* add missing system instructions
* add safety settings to send message
* add support for credentials objects
* add type checkingchange project_id to project arg
* add more tests
* fix mock creation in test
* extend docstring
* fix errors with gemini message format in chats
* add option for vertexai response validation setting & improve docstring
* readding empty message handling
* add more tests
* extend and improve gemini vertexai jupyter notebook
* rename project arg to project_id and GOOGLE_API_KEY env var to GOOGLE_GEMINI_API_KEY
* adjust docstring formatting
* Groq Client Class - main class and setup, except tests
* Change pricing per K, added tests
* Streaming support, including with tool calling
* Used Groq retries instead of loop, thanks Gal-Gilor!
* Fixed bug when using logging.
---------
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
* First pass together.ai client class
* Config handling, models and cost
* Added tests, moved param management to create function
* Tests, parameter, validation, logging updates
* Added use of client_utils PR 2949
* Updated to return OAI response
* Notebook example
* Improved function calling, updated tests, updated notebook with Chess example
* Tidied up together client class, better parameter handling, simpler exception capture, warning for no cost, reuse in tests, cleaner tests
* Update of documentation notebook, replacement of old version
* Fix of messages parameter for hide_tools function call
* Update autogen/oai/together.py
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
* Update together.py to fix text
---------
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Yiran Wu <32823396+yiranwu0@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Initial commit of Mistral client class
* Updated to manage final system message for reflection_with_llm
* Add Mistral support to client class
* Add Mistral support across the board (based on Gemini changes)
* Test file for Mistral client
* Updated handling of config, added notebook for documentation
* Added support for additional API parameters
* Remove unneeded code, updated exception raising
* Updated handling of keywords, including type checks, defaults, warnings. Updated notebook example to remove logging warnings.
* Added class description.
* Updated tests to support new config handling.
* Moved parameter parsing to create function, minimised init, added parameter tests
* Refined parameter validation
* Correct spacing
* Fixed string concat in parameter validation
* Corrected upper/lower bound warning
* Use client_tools, tidy up Mistral create, better handle tool call response, tidy tests
* Update of documentation notebook, replacement of old version
* Update to handle multiple tool_call recommendations in a message
* Updated tests to accommodate multiple tool_calls as well as content in message
* Update autogen/oai/mistral.py comment
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
* cleanup, rewrite mock
* update
---------
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
* Used absolute path of virtual environment bin path in local command executors
* Checked if the expected venv is used or not
* Added code comments for documentation
* fix: format issue - shutil lib
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
* intial setup for the anthropic client with cost config
* update: other methods added
* fix: formatting
* fix: config unused
* update: changes made in the client
* update: test added to the workflow
* update: added tests to the anthropic client
* fix: errors in workflows and client
* fix
* fix: anthropic tools type
* update: notebook anthropic
* Nonetype fixed
* fix-tests config
* update: tests and client issues
* logger support
* remove sys path
* updated the functioning of the client
* update: type hints and stream
* skip tests- importerror
* fix: anthropic client and tests
* none fix
* Alternating roles, parameter keywords, cost on response,
* update: anthropic notebook
* update: notebook with more details
* devcontainer
* update: added validate_params from the client_utils
* fix: formatting
* fix: minor comment
---------
Co-authored-by: Mark Sze <mark@sze.family>
* Addition of client utilities, initially for parameter validation
* Corrected test
* update: type checks and few tests
* fix: docs, tests
---------
Co-authored-by: Hk669 <hrushi669@gmail.com>
* fix missing message in history
* fix message handling
* add list of Parts to Content object
* add test for gemini message conversion function
* add test for gemini message conversion
* add message to asserts
* add safety setting support for vertexai
* remove vertexai safety settings
* identify model with tags instead of model name
* models
* model to tag
* add more model name
* format
* Update test/agentchat/test_function_call.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update test/agentchat/test_function_call.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update test/agentchat/test_tool_calls.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update test/agentchat/test_tool_calls.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* remove uncessary tags
* use gpt-4 as tag
* model to tag
* add tag for teachable agent test
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: AutoGen-Hub <flaml20201204@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>