Download source/codedesk/models.py from rca-umb/five-desks-code: direct link, hf CLI and curl.
- Browser
- Download file 758 Bytes
-
https://huggingface.co/datasets/rca-umb/five-desks-code/resolve/main/source/codedesk/models.py
- Command line
-
hf download hf://datasets/rca-umb/five-desks-code/source/codedesk/models.py
-
curl -L -o models.py https://huggingface.co/datasets/rca-umb/five-desks-code/resolve/main/source/codedesk/models.py
758 Bytes
| """Action and observation models. One generic action serves every task: each task lists its own tools.""" | |
| from typing import Any | |
| from openenv.core.env_server.types import Action, Observation | |
| from pydantic import Field | |
| class ToolAction(Action): | |
| tool: str = Field(min_length=1, max_length=40, description="Name of one of the tools listed in the task.") | |
| args: dict[str, Any] = Field( | |
| default_factory=dict, | |
| description="Arguments for that tool, exactly as the task lists them (an empty object if it takes none).", | |
| ) | |
| class ToolObservation(Observation): | |
| output: str = Field(default="", description="Result of the last tool call.") | |
| steps_left: int = Field(default=0, description="Tool calls left before the episode ends.") | |