mirror of
https://github.com/microsoft/autogen.git
synced 2025-12-02 01:49:53 +00:00
fix execute a_generate_reply with function_call: None (#3250)
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
This commit is contained in:
parent
0847b459d1
commit
c1289b4da7
@ -1658,8 +1658,8 @@ class ConversableAgent(LLMAgent):
|
||||
if messages is None:
|
||||
messages = self._oai_messages[sender]
|
||||
message = messages[-1]
|
||||
if "function_call" in message:
|
||||
func_call = message["function_call"]
|
||||
func_call = message.get("function_call")
|
||||
if func_call:
|
||||
func_name = func_call.get("name", "")
|
||||
func = self._function_map.get(func_name, None)
|
||||
if func and inspect.iscoroutinefunction(func):
|
||||
|
||||
@ -33,6 +33,7 @@ async def _a_tool_func_error(arg1: str, arg2: str) -> str:
|
||||
_tool_use_message_1 = {
|
||||
"role": "assistant",
|
||||
"content": None,
|
||||
"function_call": None,
|
||||
"tool_calls": [
|
||||
{
|
||||
"id": "1",
|
||||
@ -56,6 +57,7 @@ _tool_use_message_1 = {
|
||||
_tool_use_message_1_bad_json = {
|
||||
"role": "assistant",
|
||||
"content": None,
|
||||
"function_call": None,
|
||||
"tool_calls": [
|
||||
{
|
||||
"id": "1",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user