Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example to openapi doc #29

Merged
merged 2 commits into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ components:
schemas:
TaskInput:
description: Input parameters for the task. Any value is allowed.
example: "{\n\"debug\": false,\n\"mode\": \"benchmarks\"\n}"

Artifact:
type: object
Expand All @@ -238,12 +239,15 @@ components:
artifact_id:
description: ID of the artifact.
type: string
example: 'b225e278-8b4c-4f99-a696-8facf19f0e56'
file_name:
description: Filename of the artifact.
type: string
example: 'main.py'
relative_path:
description: Relative path of the artifact in the agent's workspace.
type: string
example: 'python/code/'

ArtifactUpload:
type: object
Expand All @@ -258,12 +262,15 @@ components:
relative_path:
description: Relative path of the artifact in the agent's workspace.
type: string
example: 'python/code'

StepInput:
description: Input parameters for the task step. Any value is allowed.
example: "{\n\"file_to_refactor\": \"models.py\"\n}"

StepOutput:
description: Output that the task step has produced. Any value is allowed.
example: "{\n\"tokens\": 7894,\n\"estimated_cost\": \"0,24$\"\n}"

TaskRequestBody:
type: object
Expand All @@ -272,6 +279,7 @@ components:
input:
description: Input prompt for the task.
type: string
example: "Write the words you receive to the file 'output.txt'."
additional_input:
$ref: '#/components/schemas/TaskInput'

Expand All @@ -287,8 +295,14 @@ components:
task_id:
description: The ID of the task.
type: string
example: '50da533e-3904-4401-8a07-c49adf88b5eb'
artifacts:
type: array
example:
[
'7a49f31c-f9c6-4346-a22c-e32bc5af4d8e',
'ab7b4091-2560-4692-a4fe-d831ea3ca7d6',
]
default: []
description: A list of artifacts that the task has produced.
items:
Expand All @@ -300,6 +314,7 @@ components:
properties:
input:
description: Input prompt for the step.
example: 'Washington'
type: string
additional_input:
$ref: '#/components/schemas/StepInput'
Expand All @@ -317,12 +332,15 @@ components:
task_id:
description: The ID of the task this step belongs to.
type: string
example: '50da533e-3904-4401-8a07-c49adf88b5eb'
step_id:
description: The ID of the task step.
type: string
example: '6bb1801a-fd80-45e8-899a-4dd723cc602e'
name:
description: The name of the task step.
type: string
example: 'Write to file'
status:
description: The status of the task step.
type: string
Expand All @@ -332,6 +350,7 @@ components:
output:
type: string
description: Output of the task step.
example: "I am going to use the write_to_file command and write Washington to a file called output.txt <write_to_file('output.txt', 'Washington')"
additional_output:
$ref: '#/components/schemas/StepOutput'
artifacts:
Expand Down