From 6ad5e7936fb8d4f45a8627c1af2a6fc5a8ed915c Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sat, 10 May 2025 12:33:29 -0700 Subject: [PATCH] ToolResult dataclass Refs https://github.com/simonw/llm/issues/937#issuecomment-2869123620 --- llm/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llm/models.py b/llm/models.py index 5b2da9b..87b2e0e 100644 --- a/llm/models.py +++ b/llm/models.py @@ -171,6 +171,13 @@ class ToolCall: arguments: dict +@dataclass +class ToolResult: + name: str + output: str + tool_call_id: Optional[str] = None + + @dataclass class Prompt: _prompt: Optional[str]