25 Commits

Author SHA1 Message Date
Umer Mansoor
33f29cbb59
Add gpt-4o-mini to model list (#3169)
* Add gpt-4o-mini to model list

* Fix formatting issue and verify with pre-commit

* Remove extra space

* Minor change to make pre-commit (formatting checks) pass

---------

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
Co-authored-by: Ian <ArGregoryIan@gmail.com>
2024-07-27 16:09:46 +00:00
Ian
b698a98eb0
fix openai compatible changes (#2718)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-05-22 19:53:09 +00:00
Ian
a41182a93f
Support openai assistant v2 API (#2466)
* adapted to openai assistant v2 api

* fix comments

* format code

* fix ci

* Update autogen/agentchat/contrib/gpt_assistant_agent.py

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

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-04-23 17:26:06 +00:00
Chi Wang
6636689cb9
speed up notebook in CI and fix CI failures (#2427)
* speed up notebook in CI

* improve notebook

* comment about filter

* bug fix for summary

* bump version to 0.2.26

* restrict openai version

* news update

* add tags in example
2024-04-18 16:43:34 +00:00
Chi Wang
fbe8476726
fix local test failures (#2386)
* fix local test failures

* set skip
2024-04-15 12:34:26 +00:00
Chi Wang
23ef8ecae0
Use assistant tag to filter config (#2316)
* Use assistant tag to  filter config

* bump version to 0.2.23
2024-04-08 08:07:50 +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
Ian
36c4d6aa3e
Separate openai assistant related config items from llm_config (#2037)
* add assistant config

* add test

* change notebook to use assistant config

* use assistant config in testing

* code refinement

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-16 17:21:59 +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
Ian
fb2b412c4a
Handle azure_deployment Parameter Issue in GPTAssistantAgent to Maintain Compatibility with OpenAIWrapper (#1721)
* support getting model from both llm config and config list

* address comments

* address commentsd

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-02-24 03:56:39 +00:00
Chi Wang
9708058dae
use str for hook key (#1711)
* use str for hook key

* bump version to 0.2.15

* remove github

* disable assertion
2024-02-17 18:00:23 +00:00
Ian
b270a2e467
support azure assistant api (#1616)
* support azure assistant api

* try to add azure testing

* improve testing

* fix testing

* fix code

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-02-15 05:29:08 +00:00
olgavrou
00417edb5a
Custom Model Client support (#1345)
* add client interface, response protocol, and move code into openai client class

* add ability to register custom client

* tidy up code

* adding checks and errors, and more unit tests

* remove code

* fix error msg

* add use_docer False in notebook

* better error message

* add another example to custom model notebook

* rename and have register_client take model name too

* make Client protocol and remove inheritance

* renames

* update notebook

* add link

* rename and more error checking for registered agents

* adding message retrieval to client protocol for more flexible response

* fix failing openai test

* api_type req made model_client_cls requirement

* notebook cleanup and added blog

* remove raise error if client list is empty - client list will never be empty it will have placeholders

* rename Client -> ModelClient

* add forgotten file

* fix test by fetching internal client

* Update autogen/oai/client.py

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

* don't add retrieval function to cache

* added placeholder cllient class during initial client init, and rewrote registration

* fix spelling

* Update autogen/agentchat/conversable_agent.py

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

* type hints, small fixes, docstr comment

* fix api type checking

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-02-02 17:21:19 +00:00
Davor Runje
b0f42a1bd4
Fix tests for GPT assistant (#1505)
* fixed tests for gpt assistant

* fixed tests for gpt assistant

* api_type openai

* tests updated

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-02-02 16:27:13 +00:00
Justin Trugman
5eaf712a88
Implement Overwrite Tools Functionality in GPTAssistantAgent (#1434)
* added overwrite_tools logic to GPTAssistantAgent

* added test test_gpt_assistant_tools_overwrite

* fetch tools without get_assistant_tools method

* fixed code formatting

* fixed no .get found
2024-02-01 15:11:54 +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
afourney
4fcc45f140
[Core] Throw an error when the OAI_CONFIG_LIST is missing. (#1082)
* Throw an explicit and proper error when someone asks to load the OAI_CONFIG_LIST, and it is missing.

* Updated to use pytest.raises. Added docstring. Updated some tests to not try to load the config_list when skipping OAI tests.

* Fixed wrong indentation in config_list_from_json, and updated test_utils to work with non-empty lists.

* Read key location from global constants.

* Added missingpath.

* Moved config_list_from_json to inside a skip check.
2024-01-03 16:58:58 +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
Ian
d583ad833f
Filter out candidates with the same name but different instructions, … (#925)
* Filter out candidates with the same name but different instructions, file IDs, and function names

* polish

* improve log

* improving log

* improve log

* Improve function signature (#2)

* try to fix ci

* try to fix ci

---------

Co-authored-by: gagb <gagb@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2023-12-27 14:21:09 +00:00
KazooTTT
a122ffe541
Fix/typo (#1034)
* fix: typo

* fix: typo

* fix: typo of function name

* fix: typo of function name of test file

* Update test_token_count.py

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2023-12-22 16:00:46 +00:00
Ian
c705c6a6f8
support retrievaling assistant by name (#718)
* support assistant retrieval using name

* address comment

* Update autogen/agentchat/contrib/gpt_assistant_agent.py

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

* make code more reading friendly

* ignore test error

* format code

* Update autogen/agentchat/contrib/gpt_assistant_agent.py

typo fix

* fix test case

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2023-11-24 17:46:50 +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
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
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
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