mirror of
https://github.com/microsoft/autogen.git
synced 2025-07-03 07:04:16 +00:00

## Why are these changes needed? This change introduces support for dynamic formatting of tool call summary messages by allowing a user-defined `tool_call_summary_format_fct`. Instead of relying solely on a static string template, this function enables runtime generation of summary messages based on the specific tool call and its result. This provides greater flexibility and cleaner integration without introducing any breaking changes. ### My Use Case / Problem In my use case, I needed concise summaries for successful tool calls and detailed messages for failures. The existing static summary string didn't allow conditional formatting, which led to overly verbose success messages or inconsistent failure outputs. This change allows customizing summaries per result type, solving that limitation cleanly. ## Related issue number Closes #6426 ## Checks - [x] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [x] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [x] I've made sure all auto checks have passed. --------- Co-authored-by: Chris Wieczorek <Chris.Wieczorek@iav.de> Co-authored-by: EeS <chiyoung.song@motov.co.kr> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> Co-authored-by: Mehrsa Golestaneh <mehrsa.golestaneh@gmail.com> Co-authored-by: Mehrsa Golestaneh <mgolestaneh@microsoft.com> Co-authored-by: Zhenyu <81767213+Dormiveglia-elf@users.noreply.github.com>