mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
use strict for new gpt4o
This commit is contained in:
parent
5c24a06dc8
commit
675263623d
3 changed files with 6 additions and 6 deletions
|
@ -1031,7 +1031,7 @@ class Coder:
|
|||
if self.partial_response_function_call:
|
||||
args = self.parse_partial_args()
|
||||
if args:
|
||||
content = args["explanation"]
|
||||
content = args.get("explanation") or ""
|
||||
else:
|
||||
content = ""
|
||||
elif self.partial_response_content:
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import json
|
||||
|
||||
from aider import diffs
|
||||
|
||||
from ..dump import dump # noqa: F401
|
||||
|
@ -14,9 +12,9 @@ class SingleWholeFileFunctionCoder(Coder):
|
|||
dict(
|
||||
name="write_file",
|
||||
description="write new content into the file",
|
||||
strict=True,
|
||||
parameters=dict(
|
||||
type="object",
|
||||
required=["explanation", "content"],
|
||||
properties=dict(
|
||||
explanation=dict(
|
||||
type="string",
|
||||
|
@ -27,9 +25,11 @@ class SingleWholeFileFunctionCoder(Coder):
|
|||
),
|
||||
content=dict(
|
||||
type="string",
|
||||
description="Content to write to the file",
|
||||
# description="Content to write to the file",
|
||||
),
|
||||
),
|
||||
required=["explanation", "content"],
|
||||
additionalProperties=False,
|
||||
),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -59,7 +59,7 @@ def send_completion(
|
|||
)
|
||||
|
||||
if functions is not None:
|
||||
kwargs["tools"] = [dict(type="functions", function=functions[0])]
|
||||
kwargs["tools"] = [dict(type="function", function=functions[0])]
|
||||
if extra_headers is not None:
|
||||
kwargs["extra_headers"] = extra_headers
|
||||
if max_tokens is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue