Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting callable message #1852

Merged
merged 40 commits into from
Mar 9, 2024
Merged

Supporting callable message #1852

merged 40 commits into from
Mar 9, 2024

Conversation

qingyun-wu
Copy link
Contributor

@qingyun-wu qingyun-wu commented Mar 4, 2024

Why are these changes needed?

  • Support callable message

  • Reserve message, summary_method, and summary_args as signatures of initiate_chat to make the API cleaner

  • Use a callable message instead of generate_init_message to customize the message.

Related issue number

TODO

  • Once the change in API are agreed, improve docstr
  • More tests
  • Check contrib and notebooks. @kevin666aa could you help check the changes in MathUserProxyAgent and relevant notebooks? @thinkall could you help check the changes in RetrieveUserProxyAgent and updates in relevant notebooks? The intention is to use a message function instead of overriding generate_init_message to customize the initial message. Thanks!
  • Double check generate_init_message

Future TODO

The following changes are potentially desirable because of the changes in this PR. But they may bring in breaking changes and thus leave for the future (after more thorough discussion):

  • Make generate_init_message private.
  • In the argument list of initiate_chat, the current **context to context: dict (make this change in v0.3)
  • Deprecate CompressibleAgent (a note is added in this PR already). Move the missing feature from CompressibleAgent to capability when we deprecate CompressibleAgent.
  • Re-implement AgentEval (in a different PR). @julianakiseleva
  • Update tutorial
  • Support Callable in send as well.

Checks

@qingyun-wu qingyun-wu changed the title Supporting user-defined message Supporting user-defined function as message Mar 4, 2024
@qingyun-wu qingyun-wu changed the title Supporting user-defined function as message Supporting user-defined message function Mar 4, 2024
@qingyun-wu
Copy link
Contributor Author

@qingyun-wu I don't know what "user defined message" means. Is it defined somewhere? Or can you please expand the description of PR.

Sure. Basically a message of the callable type.

@qingyun-wu qingyun-wu changed the title Supporting user-defined message function Supporting callable message Mar 9, 2024
@sonichi sonichi added this pull request to the merge queue Mar 9, 2024
Merged via the queue into main with commit c75655a Mar 9, 2024
61 checks passed
@sonichi sonichi deleted the message branch March 9, 2024 21:09
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* add message field

* send

* message func doc str

* test dict message

* retiring soon

* generate_init_message docstr

* remove todo

* update notebook

* CompressibleAgent

* update notebook

* add test

* retrieve agent

* update test

* summary_method args

* summary

* carryover

* dict message

* update nested doc

* generate_init_message

* fix typo

* update docs for mathchat

* Fix missing message

* Add docstrings

* model

* notebook

* default naming

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
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.

6 participants