autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Fix Exception in a_generate_reply when function_call is None

Open artero opened this issue 1 year ago • 1 comments

Why are these changes needed?

After executing generate_reply or a_generate_reply for an agent with a tool, the generated response (using the GPT-4o-mini model) contains "function_call"=None. If we call that function again, it causes an exception in the case of a_generate_reply (but not in generate_reply).

Related issue number

None

Checks

  • [x] 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.
  • [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.

artero avatar Jul 30 '24 05:07 artero

lgtm

umermansoor avatar Jul 31 '24 03:07 umermansoor