diff --git a/homeassistant/helpers/llm.py b/homeassistant/helpers/llm.py index b472e7f7adf..b87a4b8dcb0 100644 --- a/homeassistant/helpers/llm.py +++ b/homeassistant/helpers/llm.py @@ -3,7 +3,7 @@ from __future__ import annotations from abc import ABC, abstractmethod -from dataclasses import asdict, dataclass +from dataclasses import dataclass from enum import Enum from typing import Any @@ -138,7 +138,8 @@ class APIInstance: async def async_call_tool(self, tool_input: ToolInput) -> JsonObjectType: """Call a LLM tool, validate args and return the response.""" async_conversation_trace_append( - ConversationTraceEventType.LLM_TOOL_CALL, asdict(tool_input) + ConversationTraceEventType.LLM_TOOL_CALL, + {"tool_name": tool_input.tool_name, "tool_args": str(tool_input.tool_args)}, ) for tool in self.tools: