1184 Commits

Author SHA1 Message Date
afourney
f790109271
Re-added completion logging when using older versions of autogen. (#701) 2023-11-18 17:11:25 +00:00
gagb
1b1cfaf450
Update FAQ.md with api_base vs base_url question (#672)
added a faq for api_base vs base_url because people were asking about it frequently.
2023-11-18 12:58:06 +00:00
Li Jiang
370ebf5e00
Update speaker selector in GroupChat and update some notebooks (#688)
* Add speaker selection methods

* Update groupchat RAG

* Update seed to cache_seed

* Update RetrieveChat notebook

* Update parameter name

* Add test

* Add more tests

* Add mock to test

* Add mock to test

* Fix typo speaking

* Add gracefully exit manual input

* Update round_robin docstring

* Add method checking

* Remove participant roles

* Fix versions in notebooks

* Minimize installation overhead

* Fix missing lower()

* Add comments for try_count 3

* Update warning for n_agents < 3

* Update warning for n_agents < 3

* Add test_n_agents_less_than_3

* Add a function for manual select

* Update version in notebooks

* Fixed bugs that allow speakers to go twice in a row even when allow_repeat_speaker = False

---------

Co-authored-by: Adam Fourney <adamfo@microsoft.com>
2023-11-17 13:56:11 +00:00
Shaokun Zhang
3ab8c97eb6
update side bar (#702)
Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
2023-11-17 12:40:33 +00:00
afourney
f939dda150
Makes select_speaker more robust by checking for mentions anywhere. (#669)
* Makes select_speaker more robust by checking for agents mentioned anywhere in the selection string. Addresses 663.

* Added test coverage for group chat mentions. Refactored mention counter to own function.

* Fixed pre-commit formatting.
2023-11-17 02:30:24 +00:00
spore
d3401599bd
Fix some type annotations and edge cases (#572)
* Fix some type annotations in agents

This fixes some errors in type annotations of `ConversableAgent`,
`UserProxyAgent`, `GroupChat` and `AssistantAgent` by adjusting the type
signature according to the actual implementation. There should be no
change in code behavior.

* Fix agent types in `GroupChat`

Some `Agent`s are actually required to be `ConversableAgent` because
they are used as one.

* Convert str message to dict before printing message

* Revert back to Agent for GroupChat

* GroupChat revert update

---------

Co-authored-by: Beibin Li <beibin79@gmail.com>
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
2023-11-16 20:37:36 +00:00
gagb
fe0092516b
Add RAG gptassistant example notebook (#694)
* Add RAG gptassistant example notebook

* add notebook links

* Update notebook md

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-16 17:15:21 +00:00
Haotian Zheng
4e3723dd54
Update index.mdx (#696) 2023-11-16 15:02:25 +00:00
Ian
a730a63e30
fix assistant creating without file (#689)
* fix assistant creating without file

* add a simple unit test

* format code
2023-11-16 12:51:32 +00:00
afourney
b0a6d72b8c
Addresses issue 635, relating to newlines in Windows. (#678) 2023-11-15 22:27:10 +00:00
afourney
5dfc73dfb0
Added an 'auto' mode to last_n_messages (#693)
* Added an 'auto' mode to last_n_messages

* Added tests for the last_n_messages = 'auto' mode

* Added test one additional test case that was overlooked.
2023-11-15 22:26:04 +00:00
afourney
72f488e4d7
Allows users to specify a different requirements.txt file to install in Docker, to test other versions or branches of Autogen. Closes #662 (#671) 2023-11-15 00:33:09 +00:00
afourney
c37453735a
Sets the umask before executing the task in Docker. (#593)
* Sets the umask before executing the task in Docker.

* Added version backward compatibility for disabling cache and setting timeouts.
2023-11-14 21:14:38 +00:00
Olaoluwa Ademola Salami
d542340856
Issue-560 (#578)
* Issue-560

* fixed

* answers bothe question
2023-11-14 03:08:06 +00:00
gagb
a5e3c9daa1
Update index.mdx with version number (#670) 2023-11-13 22:05:55 +00:00
gagb
467f73847b
Fix typos in affiliation (#667) 2023-11-13 21:45:49 +00:00
Qingyun Wu
841b533da8
add doc about openai assistants (#659)
* add doc for openai assistants

* Update README.md

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

* add basic notebook

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
0.2.0b5
2023-11-13 21:05:30 +00:00
gagb
08145bfbce
Add blog post for open ai assistants (#638)
* Add outline + update author list

* Update blog

* Fix typo

* Update website/blog/2023-11-13-OAI-assistants/index.mdx

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* Update website/blog/2023-11-13-OAI-assistants/index.mdx

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* Update website/blog/2023-11-13-OAI-assistants/index.mdx

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* Add version number

* Add acknowledgements

* Update

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-13 20:26:05 +00:00
LeoLjl
4711260582
Add agentchat_oai_assistant_groupchat.ipynb (#656)
* Add agentchat_oai_assistant_groupchat.ipynb

* Update notebook/agentchat_oai_assistant_groupchat.ipynb

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

* Update agentchat_oai_assistant_groupchat.ipynb

* Update notebook/agentchat_oai_assistant_groupchat.ipynb

* Update notebook/agentchat_oai_assistant_groupchat.ipynb

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-13 17:47:00 +00:00
Jieyu Zhang
2ffc3fddac
fix tag in EcoAssistant blog (#657) 2023-11-13 17:27:32 +00:00
LeoLjl
6d621a9840
Add openai_client as property and update notebook. (#654)
* Initial commit

* Add code interpreter notebook.

* Update code interpreter notebook.

* Update notebook.

* Update agentchat_oai_code_interpreter.ipynb

* Update agentchat_oai_code_interpreter.ipynb

* Add openai_client as property.

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-13 13:21:20 +00:00
LeoLjl
991d2066d5
Add code interpreter for GptAssistant Notebook. (#644)
* Initial commit

* Add code interpreter notebook.

* Update code interpreter notebook.

* Update notebook.

* Update agentchat_oai_code_interpreter.ipynb

* Update agentchat_oai_code_interpreter.ipynb

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-13 04:02:38 +00:00
Jieyu Zhang
c1d6a5e54c
add EcoAssistant blog (#647)
* add EcoAssistant blog

* add blog

* Rename blog.md to blog.mdx

* Rename blog.mdx to index.mdx

* Update index.mdx

* Update index.mdx
2023-11-13 00:13:36 +00:00
Chi Wang
337ac4c5ce
bump version (#645)
* bump version

* use AssertionError

* revise error

* oai import

* ImportError

* error

* use openai endpoint

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-12 20:35:03 +00:00
Ian
9a216b1deb
Openai assistant function usage notebook (#639)
* add oai assistant function call

* polish

* add titles

* polish

* Update notebook/agentchat_oai_assistant_function_call.ipynb

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

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-12 17:59:46 +00:00
gagb
032c05e954
Add basic notebook for gptassistant (#636)
* Refactor GPTAssistantAgent constructor to handle
instructions and overwrite_instructions flag

- Ensure that `system_message` is always consistent with `instructions`
- Ensure provided instructions are always used
- Add option to permanently modify the instructions of the assistant

* Improve default behavior

* Add a test; add method to delete assistant

* Add a new test for overwriting instructions

* Add test case for when no instructions are given for existing assistant

* Add pytest markers to test_gpt_assistant.py

* add test in workflow

* update

* fix test_client_stream

* comment out test_hierarchy_

* Add basic gptassistant notebook

- also improve logging in gpt assistant

* Update notebook/agentchat_oai_assistant_twoagents_basic.ipynb

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-12 17:07:10 +00:00
Qingyun Wu
c22a322aff
uncomment test (#640) 2023-11-12 13:37:48 +00:00
gagb
df2cd36dee
Refactor GPTAssistantAgent (#632)
* Refactor GPTAssistantAgent constructor to handle
instructions and overwrite_instructions flag

- Ensure that `system_message` is always consistent with `instructions`
- Ensure provided instructions are always used
- Add option to permanently modify the instructions of the assistant

* Improve default behavior

* Add a test; add method to delete assistant

* Add a new test for overwriting instructions

* Add test case for when no instructions are given for existing assistant

* Add pytest markers to test_gpt_assistant.py

* add test in workflow

* update

* fix test_client_stream

* comment out test_hierarchy_

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
2023-11-12 06:03:51 +00:00
Li Jiang
ff414892c4
Fix docstring of get_or_create (#583)
* Fix docstring of get_or_create

* Improve docstring
2023-11-12 03:10:58 +00:00
Yiran Wu
805d8452c4
Fix test error of compressible agent (#631)
* fix bug in test

* update workflow

* update

* deepcopy to copy
v0.2.0b4
2023-11-11 19:57:14 +00:00
wonderful
6bb7acc34d
Handled possible unclear IndexError in ConversableAgent.last_message method (#622)
* Handled possible IndexError in ConversableAgent.last_message method with more clear error message and added test in test_conversable_agent.py.

* Fix code formatting issues.

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-11 18:55:57 +00:00
Qingyun Wu
fda7a39dd9
improve readme (#630)
* improve readme

* Update README.md

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

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-11 15:17:04 +00:00
Alvaro Mateos
849feda98e
Enable streaming support for openai v1 (#597)
* Enable streaming support for openai v1

* Added tests for openai client streaming

* Fix test_completion_stream
2023-11-11 14:30:40 +00:00
Malik Muhammad Moaz
8d225dbcad
added twitter(X) banner + link to readme (#615)
* added twitter(X) banner + link to readme

* Update README.md

Fix typo in the label

---------

Co-authored-by: gagb <gagb@users.noreply.github.com>
2023-11-11 13:56:45 +00:00
Ian
f77ca897f2
Introducing Experimental GPT Assistant Agent in AutoGen (#616)
* add gpt assistant agent

* complete code

* Inherit class ConversableAgent

* format code

* add code comments

* add test case

* format code

* fix test

* format code

* Improve GPTAssistant

* Use OpenAIWrapper to create client
* Implement clear_history()
* Reply message formatting improvements
* Handle the case when content contains image files

* README update

* Fix doc string of methods

* add multiple conversations support

* Add GPT Assistant Agent into README

* fix test

---------

Co-authored-by: gagb <gagb@users.noreply.github.com>
Co-authored-by: Beibin Li <beibin79@gmail.com>
2023-11-11 13:54:18 +00:00
afourney
24807be4c8
Added warnings for some GroupChat misconfigurations and selection errors (#603)
* Added warnings for some GroupChat misconfigurations and selection errors

* Fixed formatting
2023-11-11 00:54:25 +00:00
Andreas Volkmann
b1e69bf2f2
Update oai_completion.ipynb (#623)
Missing import
2023-11-11 00:50:59 +00:00
Qingyun Wu
d5cbc2b3ba
add AutoGen paper info at the beginning of readme (#621)
* add paper info on top of readme

* update info

* add paper info

* revise date
2023-11-10 17:45:59 +00:00
Yiran Wu
19ea8b8b7a
Add CompressibleAgent (#443)
* api_base -> base_url (#383)

* InvalidRequestError -> BadRequestError (#389)

* remove api_key_path; close #388

* close #402 (#403)

* openai client (#419)

* openai client

* client test

* _client -> client

* _client -> client

* extra kwargs

* Completion -> client (#426)

* Completion -> client

* Completion -> client

* Completion -> client

* Completion -> client

* support aoai

* fix test error

* remove commented code

* support aoai

* annotations

* import

* reduce test

* skip test

* skip test

* skip test

* debug test

* rename test

* update workflow

* update workflow

* env

* py version

* doc improvement

* docstr update

* openai<1

* add compressibleagent

* revise doc, add tests, add example

* fix link

* fix link

* fix link

* remove test

* update doc

* update doc

* add tiktoken to dependency

* filter_func

* async test

* dependency

* revision

* migration guide (#477)

* migration guide

* change in kwargs

* simplify header

* update optigude description

* update for dev

* revision

* revision

* allow not compressing last n msgs

* update

* correct merge

* update test workflow

* check test

* update for test

* update

* update notebook

* update

* fix bug

* update

* update

* update

* check to "pull_request_target" in contrib-openai

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-10 04:11:28 +00:00
Jieyu Zhang
0b926f4f2d
Add EcoAssistant to the research page (#612)
* Update Research.md

* Update Research.md

* Update Research.md
2023-11-09 21:08:40 +00:00
Chi Wang
5dfbbbdf73
news update (#609)
* news update

* separate lines
2023-11-09 15:40:15 +00:00
1073710317
b2b6d7c614
update return type of WolframAlphaAPIWrapper.run() (#523)
* update return type of WolframAlphaAPIWrapper.run

* replace tuple by typing.Tuple

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Yiran Wu <32823396+kevin666aa@users.noreply.github.com>
2023-11-09 15:19:36 +00:00
Joshua Kim
98115e801a
Added link to the new notebook (#594) 2023-11-09 14:38:38 +00:00
Chi Wang
dfcbea9777
seed -> cache_seed (#600) 2023-11-08 23:39:02 +00:00
Joshua Kim
2a96e4d9d2
Notebook/hierarchy flow (#482)
* Notebook showing how to use select speaker to control conversation flow.

* pytest associated with notebook.

* Added llm_config to assistant and user proxy agent, and clarified why we set use_cache to false, as requested in the review.

* Added a @pytest.mark.skipif decorator like other tests to run it only in one py version, 3.10

* Fixed config warning.

* Removd llm_config to UserProxyAgent

* Fixed minor typos.

* Reran outputs

* Remopved llm_config from user_proxy_agent

* Colab Badge link updated.

* pre-commit formatting changes.

* Fixed base_url

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
v0.2.0b3
2023-11-07 22:06:45 +00:00
Chi Wang
65ec0b19de
update version of openai dependency (#588) 2023-11-07 21:29:04 +00:00
Beibin Li
b41b366549
Large Multimodal Models in AgentChat (#554)
* LMM Code added

* LLaVA notebook update

* Test cases and Notebook modified for OpenAI v1

* Move LMM into contrib
To resolve test issues and deploy issues
In the future, we can install pillow by default, and then move back
LMM agents into agentchat

* LMM test setup update

* try...except... clause for LMM tests

* disable patch for llava agent test
To resolve dependencies issue for build

* Add LMM Blog

* Change docstring for LMM agents

* Docstring update patch

* llava: insert reply at position 1 now
So, it can still handle human_input_mode
and max_consecutive_reply

* Resolve comments
Fixing: typos, blogs, yml, and add OpenAIWrapper

* Signature typo fix for LMM agent: system_message

* Update LMM "content" from latest OpenAI release
Reference  https://platform.openai.com/docs/guides/vision

* update LMM test according to latest OpenAI release

* Fully support GPT-4V now
1. Add a notebook for GPT-4V. LLava notebook also updated.
2. img_utils updated
3. GPT-4V formatter now return base64 image with mime type
4. Infer mime type directly from b64 image content (while loading
   without suffix)
5. Test cases modified according to all the related changes.

* GPT-4V link updated in blog

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
v0.2.0b2
2023-11-06 21:33:51 +00:00
Chi Wang
306ac4d7f7
copy dicts before modifying (#551)
* copy dicts before modifying

* update notebooks

* update notebooks

* close #567
2023-11-06 21:14:05 +00:00
AkariLan
8593807359
fix wrong 'Langchain Provided Tools as Functions' doc ref (#495)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-05 18:29:33 +00:00
Vatsalya Vyas
bdfbca887d
Update README.md (#507)
Fixed small typos

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-11-05 18:09:39 +00:00