trading_agent.tools.skill_patch_tool
¶
The skill_patch tool: corrects one of the desk's own skills.
Typical usage example:
tool = SkillPatchTool(writer)
SkillPatchArguments
¶
Bases: BaseModel
The arguments of skill_patch.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The skill to change, which must be one of your own. |
old_text |
str
|
The exact text to replace, copied from the skill; it must appear once. |
new_text |
str
|
The replacement. |
reason |
str
|
What was wrong, for the skill ledger. |
SkillPatchTool
¶
Bases: Tool
Replaces text in one of the desk's own skills.
Creates the tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
writer
|
SkillWriter
|
Writes the desk's skills. |
required |
Source code in src/trading_agent/tools/skill_patch_tool.py
run
async
¶
Makes the replacement in a worker thread.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
SkillPatchArguments
|
The skill and the replacement. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
A confirmation, or why nothing changed. |