3039 Commits

Author SHA1 Message Date
aswny
75f0808b5a
allow function to remove termination string in groupchat (#2804)
* allow function to remove termination string in groupchat

* improve docstring

Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>

* improve docstring

Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>

* improve test case description

Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>

---------

Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
2024-06-06 21:55:55 +00:00
Wael Karkoub
8564bd4c48
[Refactor] Transforms Utils (#2863)
* wip

* tests + docstrings

* improves tests

* fix import
2024-06-06 21:49:22 +00:00
Xiaoyun Zhang
102d36d98f
add github icon (#2878) 2024-06-06 18:41:35 +00:00
afourney
f904b4fa17
Updated the azure client to support AAD auth. (#2879) 2024-06-06 18:12:00 +00:00
Jack Gerrits
06ba5d3ca8 Rename ModelClient to ChatCompletionClient (#54) 2024-06-05 19:51:40 +00:00
Jack Gerrits
ab420cc9ee Overhaul tools (#53)
* Overhaul tools

* add a simple test

* mypy fixes

* format
2024-06-05 19:48:14 +00:00
Jack Gerrits
837c388d38 Update readme (#52)
* Update README.md

* Update README.md
2024-06-05 18:44:23 +00:00
Jack Gerrits
8cb530f65e Simplify handler decorator (#50)
* Simplify handler decorator

* add more tests

* mypy

* formatting

* fix 3.10 and improve type handling of decorator

* test fix

* format
2024-06-05 08:51:49 -04:00
Jack Gerrits
ad513d5017 rename llm to models (#49) 2024-06-04 12:09:34 -04:00
Jack Gerrits
ed0229734d Organize some more modules (#48)
* Organize some more modules

* cleanup model_client
2024-06-04 11:13:13 -04:00
Xiaoyun Zhang
84c7c2430c
[.Net] Add AOT compatible check for AutoGen.Core (#2858)
* add AutoGen.AotCompatibility test

* add aot test

* fix build error

* update ps1 path
2024-06-04 15:01:11 +00:00
Jack Gerrits
19570fdd98 Port changes from agexplore (#47) 2024-06-04 14:17:04 +00:00
Jack Gerrits
69627aeee6 Remove accidentall added test file (#46) 2024-06-04 14:02:51 +00:00
Jack Gerrits
c0143069f4 Rename modules (#45) 2024-06-04 14:00:05 +00:00
Jack Gerrits
805707c89a Format docstrings with ruff (#43) 2024-06-04 13:36:12 +00:00
Jack Gerrits
492f8ecae0 Add detailed instructions for installation (#44) 2024-06-04 13:34:56 +00:00
Diego Colombo
5f29d6b97d
Refactor hook registration and processing methods (#2853)
* Refactor hook registration and processing methods

- Refactored the `hook_lists` dictionary to use type hints for better readability.
- Updated the `register_hook` method signature to include type hints for the `hook` parameter.
- Added type hints to the `process_last_received_message` method parameters and return value.

This commit refactors the code related to hook registration and processing in the `conversable_agent.py` file. The changes improve code readability and maintainability by using type hints and updating method signatures.

* Refactor hook_lists initialization and add type hints

- Refactored the initialization of `hook_lists` to use a colon instead of an equal sign.
- Added type hints for the parameters and return types of `process_last_received_message` method.

* Refactor hook registration and processing in conversable_agent.py

- Refactored the `hook_lists` dictionary to use a more generic type for the list of hooks.
- Updated the signature check for `process_message_before_send`, `process_all_messages_before_reply`, and `process_last_received_message` hooks to ensure they are callable with the correct signatures.
- Added error handling to raise a ValueError or TypeError if any hook does not have the expected signature.

* Refactor hook processing in conversable_agent.py

- Simplify the code by removing unnecessary type checks and error handling.
- Consolidate the logic for processing hooks in `_process_message_before_send`, `process_all_messages_before_reply`, and `process_last_received_message` methods.

* Refactor register_hook method signature for flexibility

The commit changes the signature of the `register_hook` method in `conversable_agent.py`. The second argument, `hook`, is now of type `Callable` instead of `Callable[[List[Dict]], List[Dict]]`. This change allows for more flexibility when registering hooks.
2024-06-03 22:16:58 +00:00
Zoltan Lux
a959deeac6
Use Gemini without API key (#2805)
* google default auth and svc keyfile for Gemini

* [.Net] Release note for 0.0.14 (#2815)

* update release note

* update trigger

* [.Net] Update website for AutoGen.SemanticKernel and AutoGen.Ollama (#2814)
support vertex ai compute region

* [CAP] User supplied threads for agents (#2812)

* First pass:  message loop in main thread

* pypi version bump

* Fix readme

* Better example

* Fixed docs

* pre-commit fixes

* refactoring, minor fixes, update gemini demo ipynb

* add new deps again and reset line endings

* Docstring for the init function. Use private methods

* improve docstring

---------

Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
Co-authored-by: Rajan <rajan.chari@yahoo.com>
Co-authored-by: Zoltan Lux <z.lux@campus.tu-berlin.de>
2024-06-03 21:00:00 +00:00
Jack Gerrits
7bfd182a0f Add doc about how to use aad for model client (#38)
* Add doc about how to use aad for model client

* update after testing
2024-06-03 16:06:04 -04:00
Li Jiang
2000d47406
Fix chromadb get_collection ignores custom embedding_function (#2854) 2024-06-03 18:12:03 +00:00
Chi Wang
1e5c03f66a
update guide about roadmap issues (#2846)
* update guide about roadmap issues

* update link
2024-06-03 14:08:18 +00:00
Eric Zhu
a97703e441 Code executor cleanup (#37)
* Remove code extractor; remove sanitization; clean up oai assistant; remove random agent. #36

* format
2024-06-02 20:49:46 -07:00
Krishna Shedbalkar
de99564a6e
Broken links fix (#2843)
* Update Examples.md

* Update agent_chat.md

* Update agent_chat.md

* Update Optional-Dependencies.md

* Update JSON_mode_example.ipynb

* Update JSON_mode_example.ipynb

* Update JSON_mode_example.ipynb

* Update JSON_mode_example.ipynb

* Update agentchat_agentoptimizer.ipynb

* Update agentchat_nested_chats_chess.ipynb
2024-06-02 18:58:10 +00:00
Diego Colombo
6e8331b754
Add llamaindex agent integration (#2831)
* 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.
2024-05-31 20:58:15 +00:00
Chi Wang
341a21787d
fix typo and update news (#2825)
* fix typo and update news

* add link

* update link

* fix metadata

* tag
v0.2.28
2024-05-31 03:50:41 +00:00
Eric Zhu
04c30596ed add tool call to chat completion agent (#35)
* add tool call to chat completion agent

* refactor function executor; tool executor in chat completion agent

* update example

* update orchestrator chat demo

* handle function execution result message type

* format

* temp fix for examples.

* fix

* update chat completion agent
2024-05-30 09:01:35 -07:00
Wei
752cf88f92
Fix initialization of client in retrieve_docs() function (#2830) 2024-05-30 15:45:09 +00:00
Jack Gerrits
2dc7af87ef Add function and code execution (#34)
* WIP code execution

* add tests, reorganize

* fix polars test

* credit statements

* attributions
2024-05-29 17:12:02 -04:00
Jack Gerrits
15268a86dd add structured logging for llm calls (#33)
* add structured logging for llm calls

* fix dep version
2024-05-29 10:38:11 -04:00
Rajan
47f9052672
[CAP] User supplied threads for agents (#2812)
* First pass:  message loop in main thread

* pypi version bump

* Fix readme

* Better example

* Fixed docs

* pre-commit fixes
2024-05-29 14:10:44 +00:00
Eric Zhu
cd147b6eed chat completion agent and state (#32)
* chat completion agent

* use response format enum; use Message type for chat history; remove name from state
2024-05-28 23:18:28 -07:00
Eric Zhu
e3a2f79e65 Orchestrator Chat and OAI Assistant update (#31) 2024-05-28 18:11:55 -07:00
Eric Zhu
ecbc3b7806 oai assistant and pattern fixes (#30) 2024-05-28 22:49:30 +00:00
Xiaoyun Zhang
7f635b4309
[.Net] Update website for AutoGen.SemanticKernel and AutoGen.Ollama (#2814)
* update sk documents

* add ollama doc
2024-05-28 21:55:40 +00:00
Xiaoyun Zhang
f9d3fdaf62
[.Net] Release note for 0.0.14 (#2815)
* update release note

* update trigger
2024-05-28 21:55:30 +00:00
Jack Gerrits
f4a5835772 prevent publish to self (#29) 2024-05-28 20:21:40 +00:00
Chi Wang
413a458f75
print next speaker (#2800)
* print next speaker

* fix test error
2024-05-28 13:35:55 +00:00
Jack Gerrits
7568a7a447 impl state management (#28) 2024-05-27 20:25:25 -04:00
Jack Gerrits
afc1666d5b organize core submodule (#27) 2024-05-27 17:10:56 -04:00
Jack Gerrits
f8f7418ebf ensure agent name is unique, add some docs (#26) 2024-05-27 16:33:28 -04:00
Kosta Petan
c5096a861e Merge branch 'main' into fix/readme-dupe 2024-05-27 21:08:18 +02:00
Kosta Petan
9d5830032d add json_mode to DevLead, simplify AzureGenie (#71) 2024-05-27 12:38:42 +02:00
Mark Ward
73788bdfb7
fix type object 'ConversableAgent' has no attribute 'DEFAULT_summary_prompt' (#2788)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-05-27 03:49:00 +00:00
Chi Wang
2abdbfbbcf
fix links and tags from databricks notebook (#2795) 2024-05-26 16:31:18 +00:00
Jack Gerrits
cb55e00819 Remove require_response, rename broadcast to publish, remove publish responses (#25)
* rename broadcast to publish

* remove require response, remove responses from publishing
2024-05-26 08:45:02 -04:00
Jack Gerrits
b6dd861166 Organize model client (#24)
* Organize model client

* update patterns
2024-05-26 12:21:48 +00:00
Li Jiang
c041db6cae
Improve the error messge (#2785) 2024-05-26 08:01:43 +00:00
ikarapanca
7457652520
Update Getting-Started.mdx (#2781)
Add missing os import

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-05-26 02:12:31 +00:00
Chi Wang
bbe4b79d7d
Blogpost and news (#2790)
* blog and news

* update

* economist

* news update

* bump version to 0.2.28

* link update

* address comments

* address comments

* add quote

* address comment

* address comment

* fix link

* guidance
2024-05-26 01:27:52 +00:00
TJ
5a2900124b
DBRX (Databricks LLM) example notebook (#2434)
* 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>
2024-05-25 16:28:46 +00:00