File size: 932 Bytes
7edb85f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | from typing import Any
from pydantic import BaseModel, Field
class ToolExecutionResult(BaseModel):
"""
Tek bir tool çağrısının çalışma sonucunu temsil eder.
"""
step: int = Field(
...,
ge=1,
description="Tool çağrısının çalışma sırası.",
)
tool: str = Field(
...,
min_length=1,
description="Çalıştırılan tool adı.",
)
arguments: dict[str, Any] = Field(
default_factory=dict,
description="Tool'a gönderilen argümanlar.",
)
success: bool = Field(
...,
description="Tool çağrısının başarılı olup olmadığı.",
)
result: dict[str, Any] | None = Field(
default=None,
description="Tool tarafından döndürülen sonuç.",
)
error: str | None = Field(
default=None,
description="Tool çalıştırılırken oluşan hata.",
) |