mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
force tool use
This commit is contained in:
parent
675263623d
commit
3996c4a7d5
2 changed files with 4 additions and 2 deletions
|
@ -25,7 +25,7 @@ class SingleWholeFileFunctionCoder(Coder):
|
||||||
),
|
),
|
||||||
content=dict(
|
content=dict(
|
||||||
type="string",
|
type="string",
|
||||||
# description="Content to write to the file",
|
description="Content to write to the file",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
required=["explanation", "content"],
|
required=["explanation", "content"],
|
||||||
|
|
|
@ -59,7 +59,9 @@ def send_completion(
|
||||||
)
|
)
|
||||||
|
|
||||||
if functions is not None:
|
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:
|
if extra_headers is not None:
|
||||||
kwargs["extra_headers"] = extra_headers
|
kwargs["extra_headers"] = extra_headers
|
||||||
if max_tokens is not None:
|
if max_tokens is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue