|
|
@ -12,7 +12,7 @@ class TaskInput(BaseModel):
|
|
|
|
description=(
|
|
|
|
description=(
|
|
|
|
"The input parameters for the task. Any value is allowed."
|
|
|
|
"The input parameters for the task. Any value is allowed."
|
|
|
|
),
|
|
|
|
),
|
|
|
|
example='{\n"debug": false,\n"mode": "benchmarks"\n}',
|
|
|
|
examples=['{\n"debug": false,\n"mode": "benchmarks"\n}'],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -20,17 +20,17 @@ class Artifact(BaseModel):
|
|
|
|
artifact_id: str = Field(
|
|
|
|
artifact_id: str = Field(
|
|
|
|
...,
|
|
|
|
...,
|
|
|
|
description="Id of the artifact",
|
|
|
|
description="Id of the artifact",
|
|
|
|
example="b225e278-8b4c-4f99-a696-8facf19f0e56",
|
|
|
|
examples=["b225e278-8b4c-4f99-a696-8facf19f0e56"],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
file_name: str = Field(
|
|
|
|
file_name: str = Field(
|
|
|
|
..., description="Filename of the artifact", example="main.py"
|
|
|
|
..., description="Filename of the artifact", examples=["main.py"]
|
|
|
|
)
|
|
|
|
)
|
|
|
|
relative_path: Optional[str] = Field(
|
|
|
|
relative_path: Optional[str] = Field(
|
|
|
|
None,
|
|
|
|
None,
|
|
|
|
description=(
|
|
|
|
description=(
|
|
|
|
"Relative path of the artifact in the agent's workspace"
|
|
|
|
"Relative path of the artifact in the agent's workspace"
|
|
|
|
),
|
|
|
|
),
|
|
|
|
example="python/code/",
|
|
|
|
examples=["python/code/"],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -41,7 +41,7 @@ class ArtifactUpload(BaseModel):
|
|
|
|
description=(
|
|
|
|
description=(
|
|
|
|
"Relative path of the artifact in the agent's workspace"
|
|
|
|
"Relative path of the artifact in the agent's workspace"
|
|
|
|
),
|
|
|
|
),
|
|
|
|
example="python/code/",
|
|
|
|
examples=["python/code/"],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -52,7 +52,7 @@ class StepInput(BaseModel):
|
|
|
|
"Input parameters for the task step. Any value is"
|
|
|
|
"Input parameters for the task step. Any value is"
|
|
|
|
" allowed."
|
|
|
|
" allowed."
|
|
|
|
),
|
|
|
|
),
|
|
|
|
example='{\n"file_to_refactor": "models.py"\n}',
|
|
|
|
examples=['{\n"file_to_refactor": "models.py"\n}'],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,7 +63,7 @@ class StepOutput(BaseModel):
|
|
|
|
"Output that the task step has produced. Any value is"
|
|
|
|
"Output that the task step has produced. Any value is"
|
|
|
|
" allowed."
|
|
|
|
" allowed."
|
|
|
|
),
|
|
|
|
),
|
|
|
|
example='{\n"tokens": 7894,\n"estimated_cost": "0,24$"\n}',
|
|
|
|
examples=['{\n"tokens": 7894,\n"estimated_cost": "0,24$"\n}'],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -71,9 +71,9 @@ class TaskRequestBody(BaseModel):
|
|
|
|
input: Optional[str] = Field(
|
|
|
|
input: Optional[str] = Field(
|
|
|
|
None,
|
|
|
|
None,
|
|
|
|
description="Input prompt for the task.",
|
|
|
|
description="Input prompt for the task.",
|
|
|
|
example=(
|
|
|
|
examples=[(
|
|
|
|
"Write the words you receive to the file 'output.txt'."
|
|
|
|
"Write the words you receive to the file 'output.txt'."
|
|
|
|
),
|
|
|
|
)],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
additional_input: Optional[TaskInput] = None
|
|
|
|
additional_input: Optional[TaskInput] = None
|
|
|
|
|
|
|
|
|
|
|
@ -82,15 +82,15 @@ class Task(TaskRequestBody):
|
|
|
|
task_id: str = Field(
|
|
|
|
task_id: str = Field(
|
|
|
|
...,
|
|
|
|
...,
|
|
|
|
description="The ID of the task.",
|
|
|
|
description="The ID of the task.",
|
|
|
|
example="50da533e-3904-4401-8a07-c49adf88b5eb",
|
|
|
|
examples=["50da533e-3904-4401-8a07-c49adf88b5eb"],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
artifacts: List[Artifact] = Field(
|
|
|
|
artifacts: List[Artifact] = Field(
|
|
|
|
[],
|
|
|
|
[],
|
|
|
|
description="A list of artifacts that the task has produced.",
|
|
|
|
description="A list of artifacts that the task has produced.",
|
|
|
|
example=[
|
|
|
|
examples=[[
|
|
|
|
"7a49f31c-f9c6-4346-a22c-e32bc5af4d8e",
|
|
|
|
"7a49f31c-f9c6-4346-a22c-e32bc5af4d8e",
|
|
|
|
"ab7b4091-2560-4692-a4fe-d831ea3ca7d6",
|
|
|
|
"ab7b4091-2560-4692-a4fe-d831ea3ca7d6",
|
|
|
|
],
|
|
|
|
]],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -98,7 +98,7 @@ class StepRequestBody(BaseModel):
|
|
|
|
input: Optional[str] = Field(
|
|
|
|
input: Optional[str] = Field(
|
|
|
|
None,
|
|
|
|
None,
|
|
|
|
description="Input prompt for the step.",
|
|
|
|
description="Input prompt for the step.",
|
|
|
|
example="Washington",
|
|
|
|
examples=["Washington"],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
additional_input: Optional[StepInput] = None
|
|
|
|
additional_input: Optional[StepInput] = None
|
|
|
|
|
|
|
|
|
|
|
@ -113,17 +113,17 @@ class Step(StepRequestBody):
|
|
|
|
task_id: str = Field(
|
|
|
|
task_id: str = Field(
|
|
|
|
...,
|
|
|
|
...,
|
|
|
|
description="The ID of the task this step belongs to.",
|
|
|
|
description="The ID of the task this step belongs to.",
|
|
|
|
example="50da533e-3904-4401-8a07-c49adf88b5eb",
|
|
|
|
examples=["50da533e-3904-4401-8a07-c49adf88b5eb"],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
step_id: str = Field(
|
|
|
|
step_id: str = Field(
|
|
|
|
...,
|
|
|
|
...,
|
|
|
|
description="The ID of the task step.",
|
|
|
|
description="The ID of the task step.",
|
|
|
|
example="6bb1801a-fd80-45e8-899a-4dd723cc602e",
|
|
|
|
examples=["6bb1801a-fd80-45e8-899a-4dd723cc602e"],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
name: Optional[str] = Field(
|
|
|
|
name: Optional[str] = Field(
|
|
|
|
None,
|
|
|
|
None,
|
|
|
|
description="The name of the task step.",
|
|
|
|
description="The name of the task step.",
|
|
|
|
example="Write to file",
|
|
|
|
examples=["Write to file"],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
status: Status = Field(
|
|
|
|
status: Status = Field(
|
|
|
|
..., description="The status of the task step."
|
|
|
|
..., description="The status of the task step."
|
|
|
@ -131,11 +131,11 @@ class Step(StepRequestBody):
|
|
|
|
output: Optional[str] = Field(
|
|
|
|
output: Optional[str] = Field(
|
|
|
|
None,
|
|
|
|
None,
|
|
|
|
description="Output of the task step.",
|
|
|
|
description="Output of the task step.",
|
|
|
|
example=(
|
|
|
|
examples=[(
|
|
|
|
"I am going to use the write_to_file command and write"
|
|
|
|
"I am going to use the write_to_file command and write"
|
|
|
|
" Washington to a file called output.txt"
|
|
|
|
" Washington to a file called output.txt"
|
|
|
|
" <write_to_file('output.txt', 'Washington')"
|
|
|
|
" <write_to_file('output.txt', 'Washington')"
|
|
|
|
),
|
|
|
|
)],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
additional_output: Optional[StepOutput] = None
|
|
|
|
additional_output: Optional[StepOutput] = None
|
|
|
|
artifacts: List[Artifact] = Field(
|
|
|
|
artifacts: List[Artifact] = Field(
|
|
|
|