From d57d2dfe95bb45a75be2ca555c60533fa3662107 Mon Sep 17 00:00:00 2001 From: merwanehamadi Date: Sun, 13 Aug 2023 13:50:04 -0700 Subject: [PATCH 1/2] Add example to openapi doc --- openapi.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openapi.yml b/openapi.yml index d509db6..4865bcf 100644 --- a/openapi.yml +++ b/openapi.yml @@ -272,6 +272,7 @@ components: input: description: Input prompt for the task. type: string + example: "Write the word 'Washington' to a .txt file" additional_input: $ref: '#/components/schemas/TaskInput' @@ -287,8 +288,10 @@ 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: @@ -300,6 +303,7 @@ components: properties: input: description: Input prompt for the step. + example: "Write the word 'Washington' to a .txt file" type: string additional_input: $ref: '#/components/schemas/StepInput' @@ -317,9 +321,11 @@ 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 @@ -332,6 +338,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 Date: Mon, 14 Aug 2023 14:45:35 +0200 Subject: [PATCH 2/2] Add more examples --- openapi.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/openapi.yml b/openapi.yml index 4865bcf..3de0364 100644 --- a/openapi.yml +++ b/openapi.yml @@ -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 @@ -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 @@ -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 @@ -272,7 +279,7 @@ components: input: description: Input prompt for the task. type: string - example: "Write the word 'Washington' to a .txt file" + example: "Write the words you receive to the file 'output.txt'." additional_input: $ref: '#/components/schemas/TaskInput' @@ -288,10 +295,14 @@ components: task_id: description: The ID of the task. type: string - example: "50da533e-3904-4401-8a07-c49adf88b5eb" + example: '50da533e-3904-4401-8a07-c49adf88b5eb' artifacts: type: array - example: ["7a49f31c-f9c6-4346-a22c-e32bc5af4d8e", "ab7b4091-2560-4692-a4fe-d831ea3ca7d6"] + example: + [ + '7a49f31c-f9c6-4346-a22c-e32bc5af4d8e', + 'ab7b4091-2560-4692-a4fe-d831ea3ca7d6', + ] default: [] description: A list of artifacts that the task has produced. items: @@ -303,7 +314,7 @@ components: properties: input: description: Input prompt for the step. - example: "Write the word 'Washington' to a .txt file" + example: 'Washington' type: string additional_input: $ref: '#/components/schemas/StepInput' @@ -321,14 +332,15 @@ components: task_id: description: The ID of the task this step belongs to. type: string - example: "50da533e-3904-4401-8a07-c49adf88b5eb" + example: '50da533e-3904-4401-8a07-c49adf88b5eb' step_id: description: The ID of the task step. type: string - example: "6bb1801a-fd80-45e8-899a-4dd723cc602e" + 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