[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
1b71679445
commit
6a08fee42d
2 changed files with 6 additions and 4 deletions
|
|
@ -115,9 +115,7 @@ def _neutralize_tool_call_arguments(tool_calls: list) -> list:
|
|||
for call in tool_calls:
|
||||
function = call.get("function") if isinstance(call, dict) else None
|
||||
arguments = function.get("arguments") if isinstance(function, dict) else None
|
||||
new_arguments = (
|
||||
arguments if arguments is None else _neutralize_argument_leaves(arguments)
|
||||
)
|
||||
new_arguments = arguments if arguments is None else _neutralize_argument_leaves(arguments)
|
||||
if new_arguments is arguments or new_arguments == arguments:
|
||||
out.append(call)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -188,7 +188,11 @@ class _JinjaTokenizer:
|
|||
# Templates that take "tools" are rendered by passing supports = ("tools",);
|
||||
# by default the kwarg is dropped, standing in for a tokenizer that has no
|
||||
# tool support.
|
||||
def __init__(self, template: str, supports: tuple = ()):
|
||||
def __init__(
|
||||
self,
|
||||
template: str,
|
||||
supports: tuple = (),
|
||||
):
|
||||
self._template = template
|
||||
self._supports = supports
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue