9 Commits

Author SHA1 Message Date
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