diff --git a/aider/coders/single_wholefile_func_coder.py b/aider/coders/single_wholefile_func_coder.py index 87cf9bf41..3c595bac4 100644 --- a/aider/coders/single_wholefile_func_coder.py +++ b/aider/coders/single_wholefile_func_coder.py @@ -25,7 +25,7 @@ class SingleWholeFileFunctionCoder(Coder): ), content=dict( type="string", - # description="Content to write to the file", + description="Content to write to the file", ), ), required=["explanation", "content"], diff --git a/aider/sendchat.py b/aider/sendchat.py index e45444ef9..1914a618b 100644 --- a/aider/sendchat.py +++ b/aider/sendchat.py @@ -59,7 +59,9 @@ def send_completion( ) if functions is not None: - kwargs["tools"] = [dict(type="function", function=functions[0])] + function = functions[0] + kwargs["tools"] = [dict(type="function", function=function)] + kwargs["tool_choice"] = {"type": "function", "function": {"name": function["name"]}} if extra_headers is not None: kwargs["extra_headers"] = extra_headers if max_tokens is not None: