This commit is contained in:
vbarda 2024-10-22 13:55:56 -04:00
parent 6107bba7ad
commit 9034b21b07

View File

@ -1,7 +1,7 @@
"""Hugging Face Chat Wrapper."""
from dataclasses import dataclass
import json
from dataclasses import dataclass
from typing import (
Any,
Callable,
@ -107,7 +107,6 @@ def _convert_TGI_message_to_LC_message(
additional_kwargs: Dict = {}
if tool_calls := _message.tool_calls:
if "arguments" in tool_calls[0]["function"]:
functions = tool_calls[0]["function"].pop("arguments")
tool_calls[0]["function"]["arguments"] = json.dumps(
functions, ensure_ascii=False