Commit Graph

1167 Commits

Author SHA1 Message Date
Eric Zhu 22e36cbb10
Support for Python 3.12 (#1317)
* support for Python 3.12

* add python 3.12 to workflows

* version string fix

* retrieval chat

* teachability

* workflow

* redistribute notebook tests

* fix incorrect notebook introduction

* update banner; remove unused imports; update openai workflow

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-18 07:15:06 +00:00
cheng-tan 0f59322bc3
Fix website accessibility (#1153)
* fix light theme accessibility

* fix dark theme

* fix format

* Fix formatting

---------

Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-18 04:42:45 +00:00
Brian Finney 73c75226b6
def _prepare_chat for groupchat manager to reset the groupchat (#1254)
* def _prepare_chat for groupchat manager to reset the groupchat

* typo

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* typehint and simplify

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-18 03:39:04 +00:00
Ashutosh Kumar 260e0cfa53
Updated Blog and removed `cd frontend` (#1301)
User is already in the frontend directory so there is no need to run `cd frontend`

Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2024-01-17 18:07:10 +00:00
Olivier Mertens 23d6e1ec8a
Update README.md (#1306)
Correct error in link for autogenstudio/utils/dbdefaults.json extra T :)
2024-01-17 15:01:49 +00:00
Yannick Müller 46e76d244f
removed alpine image (#1279)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-17 02:48:13 +00:00
Maxim Saplin 00dbcb247e
Switched to AzureOpenAI for api_type=="azure" (#1232)
* Switched to AzureOpenAI for api_type=="azure"

* Setting AzureOpenAI to empty object if no `openai`

* extra_ and openai_ kwargs

* test_client, support for Azure and "gpt-35-turbo-instruct"

* instruct/azure model in test_client_stream

* generalize aoai support (#1)

* generalize aoai support

* Null check, fixing tests

* cleanup test

---------

Co-authored-by: Maxim Saplin <smaxmail@gmail.com>

* Returning back model names for instruct

* process model in create

* None check

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-17 02:03:14 +00:00
Suhaha 39182ccb6b
[AutoGen Studio] Fix the process of new workflow (#1181)
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2024-01-17 01:59:21 +00:00
Yiran Wu acf81ac420
Add usage summary for agents (#1269)
* update

* update

* Update notebook/oai_client_cost.ipynb

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* update doc and test

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-17 01:55:29 +00:00
Chi Wang 563b1bb00b
remove filter_dict (#1284) 2024-01-16 17:24:17 +00:00
Chi Wang adbfb206dc
add workdir in test (#1274)
* add workdir in test

* catch filenotfound

* modify print msg
2024-01-16 03:26:18 +00:00
Eric Zhu e784f2b9b6
[Core] Update documentation for function call compatibility (#1237)
* #1206

* doc

* add test for azure openai

* prior to

* filter for versions

* up to

* literal type

* update doc

* update doc

* update model list

* Update autogen/agentchat/conversable_agent.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_tool_calls.py

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-16 03:04:27 +00:00
Brian Finney d1c1548888
remove name from tool response (#1263)
* remove name from tool response

* fix tool response tests

* fix output string
2024-01-16 02:54:56 +00:00
Davor Runje bde2fc9398
replaced asyncio.coroutines.iscoroutinefunction with inspect.iscoroutine (#1267) 2024-01-16 00:21:12 +00:00
R3d91ll 135bca41de
Docker Documentation (#1251)
* Updates to the Dockerfiles making them more secure. update to the installation.md file and a start.sh file for the Dockerfile.dev to start the document server. Not ready for pull request.

* updates to the docker documentation

* clean up before commit

* added docker instructions on how to test  documentation prior to commit.

* fixed the title heading in the installation.md

* removed alternate yarn install from Dockerfile.dev

* Update sidebars.js

removed un-related change from website/sidebars.js

* cleaned up the lint errors from the pre-commit-check.

* removed bad edit from sidebars.js

* fixing git conflict with sidebars.js file

* Update Installation.md

added the missing sections back. However, do we still want the docker section under the Optional Dependencies? That looks like it would go better in the Dockerfiles.md file.

* Update Installation.md

Added mount your code back and added mount your directory for better clarity.

* Update Installation.md

Lint cleanup

* Update Installation.md

removed the relative path to samples/dockers/Dockerfiles.md with a proper URL to where it will exist

* fixed bad link to Dockerfiles.md

* Fix trailing whitespace and formatting issues

* Update link to Dockerfiles.md

* somtimes its really hard to find that lost i.

* trailing whitespace and EOF issues resolved

* fixed broken link

* trailing space an broken link

* removed broken links. will update one merged.

* fixed glaring error about building an image from a particular branch Contribute.md

* removed tic mark typo from contribute.md

---------

Co-authored-by: Todd W Bucy <todd.bucy@rackspace>
2024-01-15 17:15:59 +00:00
afourney e6325a402a
Added the ability to add tags to the OAI_CONFIG_LIST, and filter (#1226)
* Added the ability to add tags to the OAI_CONFIG_LIST, and filter on them.

* Update openai_utils.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-15 04:47:19 +00:00
Brian Finney 63a35e79f8
run sync and async in async (#1242)
* run sync and async in async

* test for async multitool call

* uncomment notebook

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Davor Runje <davor@airt.ai>
2024-01-15 02:34:27 +00:00
Chi Wang 156579565d
Improve test for function call in groupchat (#1252) 2024-01-14 22:55:53 +00:00
Eric Axel Andersen 3b2955d1e0
fix: Fixed typo from 'mont' to 'mount' (#1250) 2024-01-14 20:14:12 +00:00
Chi Wang f9c16d26a3
Fix bug in async group chat with func/tool call (#1243)
* test func/tool call in group chat w/ >2 agents

* filter_dict -> exclude

* modify comment

* add last message to groupchat

* typecheck allow_repeat_speaker
2024-01-14 18:24:05 +00:00
Chi Wang 42674c58b7
update default aoai version (#1229)
* update default aoai version

* disable notebook test that is going to be outdated

* bump version to 0.2.7
2024-01-14 05:44:30 +00:00
afourney cf5e21cbbe
Refined the user_proxy description. (#951)
* Refined the user_proxy description in cases where it is fully automated. Too often, other agents assumed it could answer on behalf of a user in human_input=NEVER mode, but it cannot.

* Refined prompt further as per discussion.
2024-01-14 01:04:27 +00:00
Eric Zhu d6a3304f55
[Core] Compatibility with function call style API (Azure OpenAI and Gemini) (#1227)
* #1206

* doc

* add test for azure openai

* prior to

* filter for versions

* up to

* literal type

* update doc
2024-01-13 20:48:46 +00:00
Eric Zhu f82248dce3
[Core] Sanitize filename before using it as docker image tag. Fix #1069 (#1127)
* fix #1069

* uncomment skips

* use importlib to check package

* better code

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-13 18:42:44 +00:00
Josef Erben 44260934f3
fix: forward kwargs to conversable agent + fix typing (#1193)
* fix: forwards kwargs to conversable agent + typing

* add description unit test

* add documentation for description
2024-01-13 15:01:39 +00:00
Olaoluwa Ademola Salami b02178b6d6
Upgrade docusaurus (#1101)
* Preparing content for MDX v3

* upgrade dcusarus to v3

* upgrade to v3

* merge main to branch

* space

* change node version to 18

* merge main

* change setup-node version

* bug fix: added escape when needed

* added escape characters in docstrings

* upgraded docusaurus to 3.0.1

* polishing

* restored commented out link

* rename file

* removed backtick

* Add support for MD files in Docusaurus

* Add support for MD files in Docusaurus

* Add support for MD files in Docusaurus

* polishing

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* merge with main and build scripts added

---------

Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2024-01-13 14:54:37 +00:00
Davor Runje 2589ae8749
Add documentation and raise exception when registering async reply function in sync chat (#1208)
* documentation update and added tests for register_reply function

* added raising an exception on an async reply function in sync chat

* big fixing

* test expanded

* Update autogen/agentchat/conversable_agent.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update autogen/agentchat/conversable_agent.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* refactorization

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-13 07:35:31 +00:00
gagb 2134c60f4b
Update studio README.md with badges (#1225) 2024-01-13 04:29:28 +00:00
Davor Runje 2e519b016a
Fix registration of async functions (#1201)
* bug fix for async functions

* Update test_conversable_agent.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update test/agentchat/test_conversable_agent.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* commented out cell in a notebook until issue #1205 is not fixed

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-11 09:01:58 +00:00
Brian Finney fba7caee53
More async tool fixes (#1204)
* tool_responses fixes

* [] is false
2024-01-11 07:29:46 +00:00
Davor Runje 56aed2d3d1
Added support for streaming tool calls (#1184)
* added support for streaming tool calls

* bug fix: removed tmp assert

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-11 04:34:51 +00:00
dependabot[bot] e7cdae63fd
Bump follow-redirects from 1.15.2 to 1.15.4 in /website (#1189)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
2024-01-10 17:38:09 +00:00
Chi Wang b548e553b6
remove inappropriate api_type (#1190) 2024-01-10 06:49:09 +00:00
Maxim Saplin 083ba32a73
Change `contrib-tests.yml` tests to use `--skip-openai` (#1132)
* Fixing RetrieveChat part

* All 5 test groups are updated to --skip-openai

* sys.path.append() fix
2024-01-10 01:42:07 +00:00
Chi Wang 78fe8f92b4
check tool_returns (#1187)
* check tool_returns

* bump version to 0.2.6
2024-01-10 00:39:49 +00:00
Davor Runje 9e45e9fe48
Documentation: polish docs for tools calls (#1185)
* polish docs

* bug fixing
2024-01-09 22:45:34 +00:00
Brian Finney c1036997d2
cleaner definition of tool_responses fixes #1174 (#1182) 2024-01-09 22:40:25 +00:00
Chi Wang 2ca8aae699
bump version to 0.2.5 (#1180) 2024-01-08 21:29:57 +00:00
Dapao Xie 5a725913ec
add __init__.py for capabilities (#1177)
* Create __init__.py

* Update __init__.py

* Update __init__.py

Fix formatting to satisfy black.

---------

Co-authored-by: Ricky Loynd <riloynd@microsoft.com>
2024-01-08 21:05:25 +00:00
bitnom 78a2d8448d
Handle streamed function calls (#1118)
* Handle streamed function calls

* apply black formatting

* rm unnecessary stdout print

* bug fix

---------

Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-01-08 06:22:31 +00:00
Davor Runje 1c4ae3d303
nbqa adedd to pre-commit, added black and ruff for notebooks (#1171)
* nbqa adedd to pre-commit, added black and ruff for notebooks

* polishing

* polishing

* polishing
2024-01-08 03:47:01 +00:00
Qingyun Wu 643a031062
guide on the usage of docker (#1111)
* docker documentation

* docker doc

* clean contribute.md

* minor change

* Add more detailed description

* add docker instructions

* more dockerfiles

* readme update

* latest python

* dev docker python version

* add version

* readme

* improve doc

* improve doc

* path name

* naming

* Update website/docs/Installation.md

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update website/docs/Installation.md

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Add suggestion to install colima for Mac users

* Update website/docs/Installation.md

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update website/docs/Installation.md

Co-authored-by: olgavrou <olgavrou@gmail.com>

* update doc

* typo

* improve doc

* add more options in dev file

* contrib

* add link to doc

* add link

* Update website/docs/Installation.md

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update website/docs/Installation.md

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* instruction

* Update website/docs/FAQ.md

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* FAQ

* comment autogen studio

---------

Co-authored-by: Yuandong Tian <yuandong@fb.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: olgavrou <olgavrou@gmail.com>
2024-01-08 02:36:04 +00:00
Ricky Loynd 3680197f70
Teachability for any agent (#1091)
* Partial implementation

* Partial implementation

* Fixes

* update tests

* cleanup

* update tests

* comments

* logging

* wording

* underscore

* Extend notebook for teachable GPTAssistantAgent

* Notebook for teachable GPTAssistantAgents

* Update notebook

* Update notebook

* Update notebook

* Update notebook

* revert file

* Update blog post and other documentation.

* pre-commit

* Address reviewer feedback.

* Add new nb link to examples page.

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-07 19:59:42 +00:00
Chi Wang 172df5545d
contributor wall & news update (#1165)
* bump version to 0.2.4

* update

* display more contributors in the wall

* news update

* news update

---------

Co-authored-by: kevin666aa <yrwu000627@gmail.com>
2024-01-07 15:50:39 +00:00
Davor Runje 8f065e06e4
Add codespell to pre-commit hooks and fix spelling of existing files (#1161)
* fixed spelling, minor errors and reformatted using black

* polishing

* added codespell to pre-commit hooks, fixed a number of spelling errors and a few minor bugs in the code

* update autogen library version in notebooks

* update autogen library version in notebooks

* update autogen library version in notebooks

* update autogen library version in notebooks

* update autogen library version in notebooks
2024-01-07 01:41:33 +00:00
Chi Wang 295b8355f1
bump version to 0.2.4 (#1160)
* bump version to 0.2.4

* update

---------

Co-authored-by: kevin666aa <yrwu000627@gmail.com>
2024-01-07 00:45:36 +00:00
Brian Finney 40dbf31a92
[Core] [Tool Call] adjust conversable agent to support tool_calls (#974)
* adjust conversable and compressible agents to support tool_calls

* split out tools into their own reply def

* copilot typo

* address review comments

* revert compressible_agent and token_count_utils calls

* cleanup terminate check and remove unnecessary code

* doc search and update

* return function/tool calls as interrupted when user provides a reply to a tool call request

* fix tool name reference

* fix formatting

* fix initiate receiving a dict

* missed changed roled

* ignore incoming role, more similiar to existing code

* consistency

* redundant to_dict

* fix todo comment

* uneeded change

* handle dict reply in groupchat

* Fix generate_tool_call_calls_reply_comment

* change method annotation for register_for_llm from functions to tools

* typo autogen/agentchat/conversable_agent.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* add deprecation comments for function_call

* tweak doc strings

* switch to ToolFunction type

* update the return to

* fix generate_init_message return type

* Revert "fix generate_init_message return type"

This reverts commit 645ba8b76a.

* undo force init to dict

* fix notebooks and groupchat tool handling

* fix type

* use get for key error

* fix teachable to pull content from dict

* change single message tool response

* cleanup unnessary changes

* little better tool response concatenation

* update tools tests

* add skip openai check to tools tests

* fix nits

* move func name normalization to oai_reply and assert configured names

* fix whitespace

* remove extra normalize

* tool name is now normalized in the generate_reply function, so will not be incorrect when sent to receive

* validate function names in init and expand comments for validation methods

* fix dict comprehension

* Dummy llm config for unit tests

* handle tool_calls set to None

* fix tool name reference

* method operates on responses not calls

---------

Co-authored-by: Yiran Wu <32823396+kevin666aa@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-01-06 17:55:25 +00:00
Linxin Song e673500129
[AutoBuild] Supporting build agents from library; supporting generating agent descriptions (#1039)
* 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>
2024-01-06 17:23:23 +00:00
afourney e5ebdb66bf
Remove GPT-4 as the default model. (#1072)
* Remove GPT-4 as the default model.

* Updated test_compressible_agent to work around a bug that would otherwise default to gpt-4. Revist after #1073 is addressed.

* Worked around another bug in test_compressible_agent. It seems the config_list was always empty!

* Reverted changes to compressible agent.

* Noted that GPT-4 is the preferred model in the OAI_CONFIG_LIST_sample and README.

* Fixed failing tests after #1110

* Update OAI_CONFIG_LIST_sample

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-05 14:27:48 +00:00
Maxim Saplin 3f343654bd
Let run tests directly via `python test_xyz.py`, fix for `conftest` import via `sys.path.append` (#1144)
* Runnig tests directly

* All tests with contrib add sys.path
2024-01-05 14:24:49 +00:00