Skip to content

Refactor GPTAssistantAgent #632

Merged
qingyun-wu merged 11 commits into
mainfrom
gagb/gptassistant
Nov 12, 2023
Merged

Refactor GPTAssistantAgent #632
qingyun-wu merged 11 commits into
mainfrom
gagb/gptassistant

Conversation

@gagb

@gagb gagb commented Nov 11, 2023

Copy link
Copy Markdown
Collaborator

Why are these changes needed?

Refactor constructor to handle instructions and overwrite_instructions flag

  • Ensure that system_message is always consistent with instructions
  • Ensure provided instructions are always used (add them as a parameter to the run)
  • Add option to permanently modify the instructions of the assistant

Related issue number

Checks

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
@codecov-commenter

codecov-commenter commented Nov 11, 2023

Copy link
Copy Markdown

Codecov Report

Merging #632 (8ecea15) into main (ff41489) will increase coverage by 22.73%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##             main     #632       +/-   ##
===========================================
+ Coverage   28.90%   51.64%   +22.73%     
===========================================
  Files          27       27               
  Lines        3359     3377       +18     
  Branches      757      801       +44     
===========================================
+ Hits          971     1744      +773     
+ Misses       2317     1439      -878     
- Partials       71      194      +123     
Flag Coverage Δ
unittests 51.43% <0.00%> (+22.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
autogen/agentchat/contrib/gpt_assistant_agent.py 1.31% <0.00%> (+1.31%) ⬆️

... and 19 files with indirect coverage changes

@gagb gagb marked this pull request as ready for review November 11, 2023 20:26
@gagb gagb requested a review from sonichi November 11, 2023 20:27
Comment thread autogen/agentchat/contrib/gpt_assistant_agent.py
Comment thread autogen/agentchat/contrib/gpt_assistant_agent.py Outdated
Comment thread autogen/agentchat/contrib/gpt_assistant_agent.py
Comment thread autogen/agentchat/contrib/gpt_assistant_agent.py
Comment thread autogen/agentchat/contrib/gpt_assistant_agent.py
Comment thread autogen/agentchat/contrib/gpt_assistant_agent.py Outdated
Comment thread autogen/agentchat/contrib/gpt_assistant_agent.py

@qingyun-wu qingyun-wu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add tests as Chi suggested. Otherewise LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants