* base requirements * autofix * Configure ruff for Python linting and formatting - Set up minimal ruff configuration with basic checks (E, W, F, I) - Add temporary ignores for common issues during migration - Configure pre-commit hooks to use ruff with pass_filenames - This enables gradual migration from black to ruff * Delete sdj * autofixed only * migrate lint action * more autofixed * more fixes * change precommit * try changing the hook * try this stuff
19 lines
895 B
Python
19 lines
895 B
Python
from typing import Any, List, Literal, Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
from letta.schemas.agent import AgentState
|
|
|
|
|
|
class ToolExecutionResult(BaseModel):
|
|
status: Literal["success", "error"] = Field(..., description="The status of the tool execution and return object")
|
|
func_return: Optional[Any] = Field(None, description="The function return object")
|
|
agent_state: Optional[AgentState] = Field(None, description="The agent state")
|
|
stdout: Optional[List[str]] = Field(None, description="Captured stdout (prints, logs) from function invocation")
|
|
stderr: Optional[List[str]] = Field(None, description="Captured stderr from the function invocation")
|
|
sandbox_config_fingerprint: Optional[str] = Field(None, description="The fingerprint of the config for the sandbox")
|
|
|
|
@property
|
|
def success_flag(self) -> bool:
|
|
return self.status == "success"
|