ai2_kit.core.script module#
- pydantic model ai2_kit.core.script.BashScript[source]#
Bases:
BaseModel
Show JSON schema
{ "title": "BashScript", "type": "object", "properties": { "template": { "anyOf": [ { "$ref": "#/$defs/BashTemplate" }, { "type": "null" } ] }, "steps": { "items": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/BashStep" } ] }, "title": "Steps", "type": "array" } }, "$defs": { "BashStep": { "additionalProperties": false, "properties": { "cmd": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Cmd" }, "cwd": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Cwd" }, "checkpoint": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Checkpoint" }, "exit_on_error": { "default": true, "title": "Exit On Error", "type": "boolean" } }, "required": [ "cmd" ], "title": "BashStep", "type": "object" }, "BashTemplate": { "additionalProperties": false, "properties": { "shebang": { "default": "#!/bin/bash", "title": "Shebang", "type": "string" }, "header": { "default": "", "title": "Header", "type": "string" }, "setup": { "default": "", "title": "Setup", "type": "string" }, "teardown": { "default": "", "title": "Teardown", "type": "string" } }, "title": "BashTemplate", "type": "object" } }, "additionalProperties": false, "required": [ "template", "steps" ] }
- Config:
extra: str = forbid
- Fields:
- field template: BashTemplate | None [Required]#
- pydantic model ai2_kit.core.script.BashStep[source]#
Bases:
BaseModel
Show JSON schema
{ "title": "BashStep", "type": "object", "properties": { "cmd": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Cmd" }, "cwd": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Cwd" }, "checkpoint": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Checkpoint" }, "exit_on_error": { "default": true, "title": "Exit On Error", "type": "boolean" } }, "additionalProperties": false, "required": [ "cmd" ] }
- Config:
extra: str = forbid
- Fields:
- field checkpoint: str | None = None#
- field cmd: str | List[str] [Required]#
- field cwd: str | None = None#
- field exit_on_error: bool = True#
- pydantic model ai2_kit.core.script.BashTemplate[source]#
Bases:
BaseModel
Show JSON schema
{ "title": "BashTemplate", "type": "object", "properties": { "shebang": { "default": "#!/bin/bash", "title": "Shebang", "type": "string" }, "header": { "default": "", "title": "Header", "type": "string" }, "setup": { "default": "", "title": "Setup", "type": "string" }, "teardown": { "default": "", "title": "Teardown", "type": "string" } }, "additionalProperties": false }
- Config:
extra: str = forbid
- Fields:
- field header: str = ''#
- field setup: str = ''#
- field shebang: str = '#!/bin/bash'#
- field teardown: str = ''#