38 Commits

Author SHA1 Message Date
Justin Trugman
10bb25ba7d
Function Calling with GPTAssistantAgent (#2375)
* 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
2024-05-02 16:56:15 +00:00
Grigorij Dudnik
36f1bf5a56
Code writing with a function call notebook created (#2121)
* code writing with function call notebook created

* code formatting

* code formatting

* code formatting

* Remarks improved

* trying to resolve conflicts in Examples.md

* trying to solve conflict, improving llm_config

* working on conflict in examples

* working on conflict in examples

* working with examples.md

* examples

* repairing examples

* Examples updated

* notebook included

* code formatting

* code formatting

* tool defenition added

* code formatting

* dot removed

* starting code

* starting code

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-04-16 15:40:49 +00:00
Chi Wang
ebd0210fa1
bump version to 0.2.22 (#2256)
* bump version to 0.2.22

* doc update

* link update

* consider the failure case
2024-04-05 13:41:14 +00:00
Eric Zhu
c63c52adec
Notebook on web scraping with tool use (#2192)
* Add web scrapping notebook

* formatting

* tags

* Update

* update
2024-04-02 14:09:10 +00:00
Eric Zhu
2bfa181b4d
New conversational chess notebook using nested chats and tool use (#2137)
* add chess notebook

* update

* update

* Update notebook with figure

* Add example link

* redirect

* Clean up example format

* address gagan's comments

* update references

* fix links
2024-03-25 16:24:08 +00:00
Qingyun Wu
8844f86525
Allow different senders in nested chat (#2028)
* allow sender in nested chat

* description

* update example list

* doc format

* meta data

* add test
2024-03-15 22:26:45 +00:00
Jack Gerrits
ea2c1b270e
Add another batch of notebooks to the website (#1969)
* Add another batch of notebooks to the website

* update link

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-15 14:30:34 +00:00
Jack Gerrits
11df53bb39
Make notebooks available in navbar (#1956) 2024-03-11 22:46:39 +00:00
Yiran Wu
c37227bd04
Allow user to pass in a customized speaker selection method (#1791)
* init PR

* update

* update code check

* update

* update

* update

* update

* Test the ability to have agents a,u,t,o,g,e,n speak in turn.

* update

* update

* update

* Evidence that groupchat not terminating because of the TERMINATE substring.

* Raising NoEligibleSpeakerException allows graceful exit before max turns

* update

* To confirm with author that custom function is meant to override graph constraints

* Confirmed the expected test behaviour with author

* Update autogen/agentchat/groupchat.py

* update

* update

---------

Co-authored-by: Joshua Kim <Joshua@spectdata.com>
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
2024-03-07 02:28:22 +00:00
swiecki
5700e272f9
UPDATE: Fixed broken examples links (#1886)
* UPDATE: Fixed broken examples links

Fixed the two broken links in the examples page. All other links confirmed to work.

* Update Examples.md
2024-03-06 15:57:51 +00:00
Jack Gerrits
799a24e04f
Create topics dir and move llm config (#1853)
* create topics dir and move llm config

* fix redirect

* fix link
2024-03-04 18:02:26 +00:00
Qingyun Wu
c6f6707f4d
Adding register_nested_chats to make nested chat easier (#1753)
* add util

* add notebook

* SoM notebook

* doc

* update notebook

* SoM

* optiguide

* rename

* add implementation

* update notebook

* update notebook

* update notebook

* summary method

* initiate_chats enhancements

* callable summary_method

* summary method

* summary method default

* docstr

* add timeout to slient pip install test

* consolidate_chat_info

* a_initiate_chat

* AssertionError tests

* AssertionError test

* update tests

* update test

* remove redudant file

* kwargs

* update notebook

* update notebook

* nested

* update SoM

* update notebook

* max_turns

* add notebook

* updatenotebook

* add notebooks

* update notebook and test

* add links to the example page

* annotations

* documentation

* default values

* Expanded details about the purpose of each cell

* update default value

* default value for reply_func_from_nested_chats

* default reply func name

* update notebook

* update optiGuide

* upload fig

* optiGuide notebook

* doc

* update notebook

* update notebook

* notebook format

* update optiguide notebook

* raise value error

* update notebook

* Improve language

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: signalprime <15487280+signalprime@users.noreply.github.com>
Co-authored-by: gagb <gagb@users.noreply.github.com>
2024-02-27 04:36:18 +00:00
Aristo
a4ab4cc9ae
Async version of multiple sequential chat (#1724)
* async_initiate_chats init commit

* Fix a_get_human_input bug

* Add agentchat_multi_task_async_chats.ipynb with concurrent exampls.

* Addess the comments, Update unit test

* Add agentchat_multi_task_async_chats.ipynb to Examples.md

* Fix type for Python 3.8

---------

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
2024-02-21 19:33:33 +00:00
Qingyun Wu
f8cb585917
Update example page (#1698)
* update example page

* Update website/docs/Examples.md

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

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-02-17 17:12:10 +00:00
Qingyun Wu
fb22f78b08
add autogen.initiate_chats (#1638)
* add initiate_chats

* update notebook

* different user

* add notebook

* add link to website

* update notebook title

* remove redundancy

* notebook

* return list

* tag

* update notebook

* update notebook

* return finished tasks

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-02-13 05:23:08 +00:00
Jack Gerrits
b4a2c6e26f
Rewrite and consolidate configuration docs (#1581)
* Rewrite and consolidate configuration docs

* add link to filtering

* updates based on comments

* update lockfile

* update redirect

* spelling mistake

* update the noqa

* update links

* fix broken links

* lint fixes

* address comments

* update wording about model selection

* update cache_seed and json pattern

* add periods

* Update the config json func and other small changes

* update wording of json string

* update intro

* update description of caching

* fix link

* spelling mistake

* fix llm config

* Update website/docs/llm_configuration.ipynb

Co-authored-by: gagb <gagb@users.noreply.github.com>

* Add examples back as notebook

---------

Co-authored-by: gagb <gagb@users.noreply.github.com>
Co-authored-by: Aaron <aaronlaptop12@hotmail.com>
2024-02-11 18:04:43 +00:00
Chi Wang
e83de5d008
add long context handling notebook (#1618)
* add long context handling notebook

* remove compression notebook
2024-02-11 05:56:05 +00:00
gagb
e0fa6ee55b
Introducing AutoAnny: A New Discord Bot Built with AutoGen (#1501)
* Move app from private repo to AutoGen

* Add icon

* Draft initial blog

* Update samples/apps/auto-anny/bot.py

Co-authored-by: Davor Runje <davor@airt.ai>

* Update README.md

* Allow specifying repo name

* Log messages and reactions to messages

* Update readme

* Update blog

* Update blog

* Update website and readme

* Extend examples

* Improve blog

* Update website/blog/2024-02-02-AutoAnny/index.mdx

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

---------

Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-02-07 01:51:00 +00:00
Qingyun Wu
3e33a2c410
New initiate_chats Interface for Managing Dependent Chats in ConversableAgent (#1402)
* add initiate_chats implementation and example

* update notebook

* improve takeaway method

* improve print

* improve print

* improve print

* improve print

* add tests

* minor changes

* format

* correct typo

* make prompt a parameter

* add takeaway method

* groupchat messages

* add SoM example

* fix typo

* fix SoM typo

* simplify chat function

* add carryover

* update notebook

* doc

* remove async for now

* remove condition on reply

* correct argument name

* add notebook in website

* format

* make get_chat_takeaway private

* rename takeaway method and add example

* removing SoM example for now

* carryover test

* add test

* takeaway_method

* update tests

* update notebook

* chats_queue

* add get_chat_takeaway

* delete

* add test

* Update autogen/agentchat/conversable_agent.py

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* docstr

* wording etc

* add chat res

* revise title

* update agent_utils

* unify the async method

* add todo about overriding

* attribute check

* ChatResult type

* revise test

* takeaway to summary

* cache and documentation

* Use cache in summarize chat; polish tests

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-02-06 18:29:15 +00:00
Joshua Kim
c603ca434e
Graph group chat (#857)
* Move contrib-openai.yml

* Moved groupgroupchat

* From #753

* Removed local test references

* Added ignore=test/agentchat/contrib

* Trying to pass contrib-openai tests

* More specific in unit testing.

* Update .github/workflows/contrib-tests.yml

Co-authored-by: Li Jiang <lijiang1@microsoft.com>

* Remove coverage as it is included in test dependencies

* Improved docstring with overview of GraphGroupChat

* Iterate on feedback

* Precommit pass

* user just use pip install pyautogen[graphs]

* Pass precommit

* Pas precommit

* Graph utils an test completed

* Added inversion tests

* Added inversion util

* allow_repeat_speaker can be a list of Agents

* Remove unnessary imports

* Expect ValueError with 1 and 0 agents

* Check that main passes all tests

* Check main

* Pytest all in main

* All done

* pre-commit changes

* noqa E402

* precommit pass

* Removed bin

* Removed old unit test

* Test test_graph_utils

* minor cleanup

* restore tests

* Correct documentation

* Special case of only one agent remaining.

* Improved pytest

* precommit pass

* Delete OAI_CONFIG_LIST_sample copy

* Returns a filtered list for auto to work

* Rename var speaker_order_dict

* To write test cases

* Added check for a list of Agents to repeat

* precommit pass

* Update documentation

* Extract names in allow_repeat_speaker

* Post review changes

* hange "pull_request_target" into "pull_request" temporarily.

* 3 return values from main

* pre-commit changes

* PC edits

* docstr changes

* PC edits

* Rest of changes from main

* Update autogen/agentchat/groupchat.py

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

* Remove unnecessary script files from tracking

* Non empty scripts files from main

* Revert changes in script files to match main branch

* Removed link from website as notebook is removed.

* test/test_graph_utils.py is tested as part of L52 of build.yml

* GroupChat ValueError check

* docstr update

* More clarification in docstr

* Update autogen/agentchat/groupchat.py

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

* Update autogen/agentchat/groupchat.py

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

* Update autogen/agentchat/groupchat.py

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

* Update autogen/agentchat/groupchat.py

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

* 1.add commit to line138 in groupchat.py;2.fix bug if random choice [];3.return selected_agent if len(graph_eligible_agents) is 1;4.replace all speaker_order to speaker_transitions;5.format

* fix graph_modelling notebook in the last cell

* fix failure in test_groupchat.py

* fix agent out of group to initiate a chat like SocietyOfMind

* add a warning rule in graph_utils to check duplicates in any lists

* refactor allowed_or_disallowed_speaker_transitions to Dict[Agent, List[Agent]] and modify the tests and notebook

* delete Rule 4 in graph_utils and related test case. Add a test to resolve 993fd006e9 (r1460726831)

* fix as the final comments

* modify setup option from graphs to graph and add texts in optional-dependencies.md

* Update autogen/graph_utils.py

---------

Co-authored-by: Li Jiang <lijiang1@microsoft.com>
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Yishen Sun <freedeaths@FREEDEATHS-XPS>
Co-authored-by: freedeaths <register917@gmail.com>
2024-02-06 03:13:18 +00:00
Jack Gerrits
82e0a0c050
fix broken links from moving oai utils notebook (#1497) 2024-02-02 16:52:07 +00:00
afourney
0107b52d5a
Adds a SocietyOfMindAgent that presents as a single agent, but runs GroupChat as an inner-monologue (#890)
* Added a GroupChatRepresentative class that uses group chat as an inner-monologue.

* Renamed GroupChatRepresentative to SocietyOfMindAgent

* Added tests for the society of mind agent.

* Don't force message attribution -- the defaults are correct.

* Add names to external messages.

* Added some comments to document code, per request.

* Added some comments to document code, per request.

* Added a Notebook example, and the ability to use a prompt as the response_preparer.

* Protect inner chat with try-catch

* Fixed typo.

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-31 00:01:40 +00:00
Byron Xu
fe7876d6ed
Add SQL agent and Spider environment (#1218)
* add SQL agent and Spider environment

* Make a notebook. Clean up environment.

* add SQL agent and Spider environment

* Make a notebook. Clean up environment.

* clarify that sql agent is for spider environment

* add link to notebook in docs

* Update doc.

---------

Co-authored-by: Wangda Zhang <wangdazhang@microsoft.com>
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-01-27 18:59:38 +00:00
afourney
708eb4d884
Add a web surfer agent that can search and browse the web. (#1093)
* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.

* Added the web surfer agent, and related tests.

* Added a notebook to show how WebSurferAgent works.

* Fixed a typo.

* Updated test_web_surfer for compatibility with #1110.

* Updated skip_oai logic.

* Fixed code formatting.

* More pre-commit fixes.

* Added block to contrib-openai.yml

* Added block to contrib-openai.yml

* Added hook for BING_API_KEY

* Temporarily commented out other tests, per request.

* Fixed indentation (maybe?)

* Restoring contrib-openai.yml
2024-01-22 03:43:15 +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
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
Shaokun Zhang
dd516f250e
AgentOptimizer (#1053)
* first

* first

* update figure

* update figure

* update txt+figure

* format

* blog

* blog update

* format

* update

* update

* rename notebook

* rename

---------

Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu>
2023-12-27 06:06:48 +00:00
gagb
a0288e081b
Add examples constrained generation + multi-step reasoning via Guidance + AutoGen (#937)
* Add examples of constrained generation

* Add guidance based coder that always returns valid code blocks

* Add guidance based agent that always generates a valid json

* Add link to guidance nb
2023-12-20 23:04:05 +00:00
gagb
03b819bdf2
Add async test (#520)
* Add example nb for async funcs

* Add a notebook based test for async function calls

* Update nb

* Update nb

* Remove duplicate code

* Rename func for consistency

* Fix bug

* Add intro text for cmd cell 4

* Add a short comment on await

* Update agentchat_function_call_async.ipynb

Minor typo

* Add link to nb

---------

Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-12-19 19:01:23 +00:00
danyrouh
3a768c3189
Simple chat app (#921)
* Add file

Initial implementation

* Add file

Implementation

* 1. update readme 2. update web example 3. update code

* update readme

* remove working dir

* update

---------

Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
2023-12-12 01:27:40 +00:00
chengxuan233
1b4fb8fb72
Adding a notebook demostrating video transcript translate with whisper in AutoGen (#881)
* add agentchat_video_transcript_translate.ipynb

* finish the agentchat_video_transcript_translate.ipynb file notebook

* modify the recognize_transcript_from_video function

* run the script and add the output to the notebook

* implement the notebook

* add the link to the video clip

* rename the file and add the version requirement of each packages

* add the new notebook path

* add the notebook path to Example.md

* add the new notebook path to the new example.md

* add the instruction of FFmpeg and video download

* Update Examples.md

* Update Examples.md

* Update Examples.md

* Update Examples.md

* Delete notebook/agentchat_video_transcript_translate.ipynb

* Update Examples.md and add the link

---------

Co-authored-by: silver233jpg <60947716+silver233jpg@users.noreply.github.com>
2023-12-07 20:11:15 +00:00
Chi Wang
73d7e9203b
bump version to 0.2.1 (#867)
* bump version to 0.2.1

* remove example link

* update

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
2023-12-05 21:09:05 +00:00
Linxin Song
83f0c744b2
Testing AutoBuild (#846)
* init notebook for agent set up

* complete AgentCreator

* AgentCreator first step features completed.

* update AgentCreator

* update AgentCreator

* update AgentCreator (modify params of build)

* [update AgentCreator] add auto judgement of coding

* add autobuild

* rename autobuild notebook

* Add step-by-step command.

* modify name

* fix bugs

* update for new openai api

* add example

* add load_config, save_config, and add task in build and start

* modify notebook

* rewrite save and load function; update notebook

* update description

* update description

* update description

* change member variable of agent_creator.py

* update notebook

* new feature: auto-generate agent name and system message

* new feature: add gpts support

* update notebook

* update notebook

* beautify; add docstring for build

* Update notebook; PR version

* typo

* update notebook

* fix typo

* try to run llama

* try to run llama

* switch api_base to base_url

* add details for Step 6; add print in clear_all_agents()

* Change description of Step 5

* delete ASSISTANT_CONFIG_LIST

* add Linxin to blog authors

* add blog

* Update index.mdx

* add test; add user proxy constrain; change show case in notebook

* modify blog for test

* change test file name; modify test

* modify test

* modify test

* add try/catch for dependency

* add version requirement for openai

* add exception for DistributionNotFound error

* add requirement

* change assertion

* rename test; modify index.mdx

* change config file name

* Update agent_chat.md

* Update agent_chat.md

* Update AgentChat.md

* complete blog; fix typos in notebook

* add autobuild banner

* try to merge

* Update Examples.md

* update test

* skip if openai not installed

* pre-commit

* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx

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

* update contrib-openai.yml

* change pull_request_target to pull_request

* disable other openai tests

* address issues from ekzhu; modify notebook; modify blog; modify test

* update test example

* update test

* Update agent_chat.md

* Update Examples.md

* address issues from qingyun; update agent_builder.py; update notebook

* recover contrib-openai.yml

* pre-commit solve

---------

Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu>
Co-authored-by: JieyuZ2 <jieyuzhang97@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-12-04 02:12:26 +00:00
Qingyun Wu
02593ff7be
Add examples (#851)
* add human involvement

* citation

* AgentEval and invalid links

* numbering

* add cost to documentation

* add cost notebook

* oai config list utilities

* add utility link

* title
2023-12-03 23:46:38 +00:00
Yiran Wu
7a4ba1a732
Add cost summary to client.py (#812)
* init commit

* add doc, notebook and test

* fix test

* update

* update

* update

* update
2023-12-03 21:06:46 +00:00
Qingyun Wu
77e1d28c1b
improve ecosystem page (#823)
* restucture

* update examples references

* fix citation
2023-12-03 01:09:55 +00:00
Nicolas Marchildon
17c51fd2f0
Enable defining new functions after agent creation (#285)
* Enable defining new functions after agent creation

* Add notebook for function inception example

* format

* 1. fix bug 2. support remove function

* 1. fix bug 2. support remove function

* 1. add example doc 2. change test file 3. change ipynb title

* Update website/docs/Examples.md

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-12-02 01:05:54 +00:00
Shaokun Zhang
ba5a07a945
Add ecosystem page for website (#803)
* add ecosystem for web

* 1. change to Resources and Examples tables 2. reformat

* fix

* fix

* fix

* update

* update

* update

* update

* update

* Update website/docs/Ecosystem.md

* update

---------

Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-30 18:31:08 +00:00