mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Fix LLM tracing for Google Generative AI (#118359)
Fix LLM tracing for Gemini
This commit is contained in:
parent
b7ee90a53c
commit
c75cb08aae
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user