autogen icon indicating copy to clipboard operation
autogen copied to clipboard

[AutoGen Studio] Set min allowed consecutive autoreply to 0

Open dragosMC91 opened this issue 2 years ago • 1 comments

Why are these changes needed?

The use case when Max Consecutive Auto Reply == 0 is to emulate the behavior of other AI Chat UIs like https://chat.openai.com/. In these interfaces, the user receives a single response from the AI for each query submitted, without any additional automated follow-up actions. User can then follow up with other queries based on the AIs response. This is pretty much the same as setting `human_input_mode="ALWAYS" for the user proxy which is not possible with the assistant UI.

Some advantages to having this option:

  1. Cost Efficiency: By ensuring that each user query results in exactly one OpenAI call, we can achieve more predictable and controlled operational costs.
  2. User Familiarity: The proposed interaction model is more intuitive for less tech-savvy users who may be accustomed to the one-query-one-response dynamic (which could lead to project gaining more traction among these types of users)
  3. Speed and Control: especially for coding related tasks, i don't want the user proxy agent to waste any time executing the code generated by the assistant agent, i often times just want some quick inspiration or feedback on a code snippet, rather than executing the code
  4. Pseudo group chat: by setting the proxy autoreply to 0 and agent autoreply to 1, the user can easily simulate a group chat where he controls the flow of information from 1 agent to another without any unneeded extra code execution steps, as showcased in the demo below:

https://github.com/microsoft/autogen/assets/11348201/4ac136f5-9a64-4914-a5ed-2b73fee3a831

Why not set the max auto reply to 1?

Because of point 3, if Max Consecutive Auto Reply == 1, the user proxy will execute the code from the assistant which i might not want, and i would like to have the option to control this

TLDR;

The proposed change is aimed at improving the user experience by providing a more controlled, cost-effective, and familiar interaction model that aligns with established AI chat interfaces.

Checks

  • [ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
  • [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
  • [ ] I've made sure all auto checks have passed.

dragosMC91 avatar Dec 30 '23 17:12 dragosMC91

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (19b5c85) 32.48% compared to head (eec20af) 32.48%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1106   +/-   ##
=======================================
  Coverage   32.48%   32.48%           
=======================================
  Files          41       41           
  Lines        4907     4907           
  Branches     1120     1120           
=======================================
  Hits         1594     1594           
  Misses       3187     3187           
  Partials      126      126           
Flag Coverage Δ
unittests 32.44% <ø> (ø)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Dec 30 '23 17:12 codecov-commenter