Commit Graph

1847 Commits

Author SHA1 Message Date
dependabot[bot] c221eea14e
Bump braces from 3.0.2 to 3.0.3 in /website (#2934)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 17:27:01 +00:00
Davor Runje c873080b0d
changed CRLF to LF (#2935) 2024-06-13 16:44:11 +00:00
Xiaoyun Zhang ca4f717616
[.Net] Add Gemini samples to AutoGen.Net website + configure Gemini package to be ready for release (#2917)
* update website

* fix buid error

* update
2024-06-13 08:01:16 +00:00
Wael Karkoub 004ba22637
human input mode annotations fixed (#2864)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-06-13 04:53:55 +00:00
ken-gravilon f36b658f8f
Docs typo cli-code-executor.ipynb (#2909)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-06-12 14:36:26 +00:00
Li Jiang 11b8c767ca
Improve update context condition checking rule (#2883)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-06-12 14:26:19 +00:00
Davor Runje a0787aced3
pre-commit version update and a few spelling fixes (#2913) 2024-06-12 06:26:22 +00:00
Davor Runje 53a59ddac6
CRLF changed to LF (#2915) 2024-06-12 06:25:18 +00:00
Daniel (Neng) Wang b03fb6d6a3
Change chunk size of vectordb from max_tokens to chunk_token_size (#2896)
* Update retrieve_user_proxy_agent.py

* Update retrieve_user_proxy_agent.py

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2024-06-11 13:09:24 +00:00
Li Jiang 067fa88b67
Update notebook (#2886) 2024-06-11 13:04:37 +00:00
Audel Rouhi bf7e4d619c
Bugfix: PGVector/RAG - Calculate the Vector Size based on Model Dimensions (#2865)
* 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>
2024-06-11 12:16:56 +00:00
Chi Wang 2d6c8c012b
version update (#2908)
* version update

* version update
2024-06-10 18:23:51 +00:00
David Luong d578d0dfd9
Squash changes (#2849) 2024-06-10 17:32:33 +00:00
Xiaoyun Zhang a16b307dc0
[.Net] Add Goolge gemini (#2868)
* update

* add vertex gemini test

* remove DTO

* add test for vertexGeminiAgent

* update test name

* update IGeminiClient interface

* add test for streaming

* add message connector

* add gemini message extension

* add tests

* update

* add gemnini sample

* update examples

* add test for iamge

* fix test

* add more tests

* add streaming message test

* add comment

* remove unused json

* implement google gemini client

* update

* fix comment
2024-06-10 17:31:45 +00:00
Victor Dibia 7d057a93b2
Autogenstudio docs (#2890)
* add autogenstudio docs

* update ags readme to point to docs page

* update docs

* update docs

* update faqs

* update, fix typos
2024-06-10 03:29:34 +00:00
Braelyn Boynton 85ad929f34
AgentOps Runtime Logging Implementation (#2682)
* add agentops req

* track conversable agents with agentops

* track tool usage

* track message sending

* remove record from parent

* remove record

* simple example

* notebook example

* remove spacing change

* optional dependency

* documentation

* remove extra import

* optional import

* record if agentops

* if agentops

* wrap function auto name

* install agentops before notebook test

* documentation fixes

* notebook metadata

* notebook metadata

* pre-commit hook changes

* doc link fixes

* git lfs

* autogen tag

* bump agentops version

* log tool events

* notebook fixes

* docs

* formatting

* Updated ecosystem manual

* Update notebook for clarity

* cleaned up notebook

* updated precommit recommendations

* Fixed links to screenshots and examples

* removed unused files

* changed notebook hyperlink

* update docusaurus link path

* reverted setup.py

* change setup again

* undo changes

* revert conversable agent

* removed file not in branch

* Updated notebook to look nicer

* change letter

* revert setup

* revert setup again

* change ref link

* change reflink

* remove optional dependency

* removed duplicated section

* Addressed clarity commetns from howard

* minor updates to wording

* formatting and pr fixes

* added info markdown cell

* better docs

* notebook

* observability docs

* pre-commit fixes

* example images in notebook

* example images in docs

* example images in docs

* delete agentops ong

* doc updates

* docs updates

* docs updates

* use agent as extra_kwarg

* add logging tests

* pass function properly

* create table

* dummy function name

* log chat completion source name

* safe serialize

* test fixes

* formatting

* type checks

---------

Co-authored-by: reibs <areibman@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Howard Gil <howardbgil@gmail.com>
Co-authored-by: Alex Reibman <meta.alex.r@gmail.com>
2024-06-07 06:01:03 +00:00
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
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
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
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
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
2024-05-31 03:50:41 +00:00
Wei 752cf88f92
Fix initialization of client in retrieve_docs() function (#2830) 2024-05-30 15:45:09 +00: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
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
Chi Wang 413a458f75
print next speaker (#2800)
* print next speaker

* fix test error
2024-05-28 13:35:55 +00: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
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
HRUSHIKESH DOKALA c273862ee5
[fix] file logger import (#2773)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-05-25 05:32:18 +00:00
David Luong 5a5c0f2a11
Remove duplicate project declared in AutoGen.sln (#2789)
* remove duplicate project in AutoGen.sln

* Add EndProject
2024-05-24 20:17:41 +00:00
Audel Rouhi 6604ca511b
PGVector Support for Custom Connection Object (#2566)
* 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>
2024-05-24 17:58:56 +00:00
jtoy 129887519d
allow serialize_to_str to work with non ascii when dumping via json.dumps (#2714)
Co-authored-by: Jason <jtoy@grids.local>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-05-24 17:51:15 +00:00
HRUSHIKESH DOKALA c0812f9b60
actions version update for the TransformMessages workflow (#2759)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-05-24 17:44:55 +00:00
David Luong 4fec246342
Introduce AnthropicClient and AnthropicClientAgent (#2769)
* Reference project

Revert "Set up the Agent. Basic Example set up, boilerplate for connector, ran into signing issue."

This reverts commit 0afe04f2

End to end working anthropic agent + unit tests

Set up the Agent. Basic Example set up, boilerplate for connector, ran into signing issue.

* Add pragma warning

* - Remove Message type
- tabbing fix white space in csproj
- Remove redundant inheritance
- Edit Anthropic.Tests' rootnamespace
- Create AutoGen.Anthropic.Samples

* short-cut agent extension method

* Pass system message in the constructor and throw if there's system message in Imessages

---------

Co-authored-by: luongdavid <luongdavid@microsoft.com>
2024-05-24 16:37:16 +00:00
Li Jiang 80b2dba6ab
Add packaging explicitly (#2780) 2024-05-24 14:52:56 +00:00
Aretai-Leah e87a6a424d
Create JSON_mode_example.ipynb (#2554)
* Create JSON_mode_example.ipynb

* updated json example

* added metadata to JSON notebook

* fixed details in wrong metadata

* Update JSON_mode_example.ipynb

removed colab cell

* fixed error

* removed cell output

* whitespace fixed

I think its fixed?

* finally fixed whitespace
2024-05-24 13:12:36 +00:00
Xiaoyun Zhang 702c010d77
[.Net] add ollama-sample and adds more tests (#2776)
* add ollama-sample and adds more tests

* Update AutoGen.Ollama.Sample.csproj
2024-05-24 04:14:29 +00:00
Xiaoyun Zhang 8d55334e4d
[.Net] add AutoGen.SemanticKernel.Sample project (#2774)
* add AutoGen.SemanticKernel.Sample

* revert change
2024-05-24 01:53:22 +00:00
Xiaoyun Zhang edb2f92b0d
[.Net] rename Autogen.Ollama to AutoGen.Ollama and add more test cases to AutoGen.Ollama (#2772)
* update test

* add llava test

* add more tests

* rm Autogen.Ollama

* add AutoGen.ollama

* update

* rename to temp

* remove ollama

* rename

* update

* rename

* rename

* update
2024-05-23 19:15:25 +00:00