22 Commits

Author SHA1 Message Date
Davor Runje
53a59ddac6
CRLF changed to LF (#2915) 2024-06-12 06:25:18 +00:00
Li Jiang
42b27b9a9d
Add isort (#2265)
* Add isort

* Apply isort on py files

* Fix circular import

* Fix format for notebooks

* Fix format

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-04-05 02:26:06 +00:00
Yiran Wu
f78985d359
StateFlow Blog (#1826)
* init PR

* update

* update code check

* update

* 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

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* udpate to comments

* update

* Update website/blog/2024-02-29-StateFlow/index.mdx

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

* update links

* remove unnecessary changes

* Update website/blog/2024-02-29-StateFlow/index.mdx

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

* Update website/blog/2024-02-29-StateFlow/index.mdx

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

* remove test for custom notebook

* update

* update

---------

Co-authored-by: Joshua Kim <Joshua@spectdata.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
2024-03-14 15:46:28 +00:00
Gunnar Kudrjavets
b8ceb866e6
Add shebang functionality to tests (#1784)
Tests that contain `if __name__ == "__main__":` now have a shebang line
and execute permission.
2024-02-29 01:11:08 +00:00
Joshua Kim
d797d267e4
Blog regarding finite-state machine (#1622)
* Initialization of fsm blog

* Pre-commit pass

* Pinyin name correction

* Updated title

* Updated title

* Added summary of notebook and note about DAG

* Update index.mdx

* Update website/blog/2024-02-11-FSM-GroupChat/index.mdx

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

* Update website/blog/2024-02-11-FSM-GroupChat/index.mdx

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

* Removed outdated filename and followed SoM notebook format

* Pre-commit pass

* Update notebook link

* Corrected link to rendered notebook

* Removed agentchat_hierarchy_flow_using_select_speaker and modified agentchat_groupchat_finite_state_machine

* Add notebook/agentchat_groupchat_finite_state_machine.ipynb to paths

---------

Co-authored-by: freedeaths <register917@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-02-26 18:10:00 +00:00
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
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
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
Maxim Saplin
c80df8acab
Skip tests that depend on OpenAI via --skip-openai (#1097)
* --skip-openai

* All tests pass

* Update build.yml

* Update Contribute.md

* Fix for failing Ubuntu tests

* More tests skipped, fixing 3.10 build

* Apply suggestions from code review

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>

* Added more comments

* fixed test__wrap_function_*

---------

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Davor Runje <davor@airt.ai>
2023-12-31 19:37:21 +00:00
Davor Runje
4b5ec5a52f
Add decorator for function calling (#1018)
* add function decorator to converasble agent

* polishing

* polishing

* added function decorator to the notebook with async function calls

* added support for return type hint and JSON encoding of returned value if needed

* polishing

* polishing

* refactored async case

* Python 3.8 support added

* polishing

* polishing

* missing docs added

* refacotring and changes as requested

* getLogger

* documentation added

* test fix

* test fix

* added testing of agentchat_function_call_currency_calculator.ipynb to test_notebook.py

* added support for Pydantic parameters in function decorator

* polishing

* Update website/docs/Use-Cases/agent_chat.md

Co-authored-by: Li Jiang <bnujli@gmail.com>

* Update website/docs/Use-Cases/agent_chat.md

Co-authored-by: Li Jiang <bnujli@gmail.com>

* fixes problem with logprob parameter in openai.types.chat.chat_completion.Choice added by openai version 1.5.0

* get 100% code coverage on code added

* updated docs

* default values added to JSON schema

* serialization using json.dump() add for values not string or BaseModel

* added limit to openai version because of breaking changes in 1.5.0

* added line-by-line comments in docs to explain the process

* polishing

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-12-25 16:07:20 +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
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
Joshua Kim
9d2ee46ebc
Controlling select_speaker using Graph Modelling Language (#720)
* Completed notebook on using GML

* Added optional dependencies for graph

* Run pre-commit

* Added pytest

* Added LLM to pick an agent before catch-all

* Updated website links to notebook

* Reviewer's suggestions

* pre-commit checked

* pre-commit passed

* Change beta version
2023-11-22 20:36:52 +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
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>
2023-11-07 22:06:45 +00:00
Chi Wang
c4f8b1c761
Dev/v0.2 (#393)
* 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 tiktoken to dependency

* filter_func

* async test

* dependency

* migration guide (#477)

* migration guide

* change in kwargs

* simplify header

* update optigude description

* deal with azure gpt-3.5

* add back test_eval_math_responses

* timeout

* Add back tests for RetrieveChat (#480)

* Add back tests for RetrieveChat

* Fix format

* Update dependencies order

* Fix path

* Fix path

* Fix path

* Fix tests

* Add not run openai on MacOS or Win

* Update skip openai tests

* Remove unnecessary dependencies, improve format

* Add py3.8 for testing qdrant

* Fix multiline error of windows

* Add openai tests

* Add dependency mathchat, remove unused envs

* retrieve chat is tested

* bump version to 0.2.0b1

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2023-11-04 04:01:49 +00:00
Chi Wang
7dd9831857 cleanup 2023-09-21 15:20:10 +00:00
Chi Wang
c8cdb2a752 cleanup 2023-09-21 15:19:06 +00:00
Chi Wang
ec85b4984d cleanup 2023-09-19 02:26:57 +00:00
Chi Wang
45ddfa2dd0 cleanup 2023-09-16 19:03:53 +00:00
Chi Wang
bc4473fe8a cleanup 2023-09-16 10:57:57 +00:00