docs: add response structure

This commit is contained in:
hieu-jan 2023-12-01 11:24:27 +09:00
parent a5446b038d
commit 198cf2e2fc
2 changed files with 111 additions and 2 deletions

View File

@ -485,6 +485,13 @@ paths:
summary: List assistants
description: |
Return a list of assistants. <a href = "https://platform.openai.com/docs/api-reference/assistants/listAssistants"> Equivalent to OpenAI's list assistants. </a>
responses:
"200":
description:
content:
application/json:
schema:
$ref: "specs/assistants.yaml#/components/schemas/ListAssistantsResponse"
post:
operationId: createAssistant
tags:
@ -492,6 +499,13 @@ paths:
summary: Create assistant
description: |
Create an assistant with a model and instructions. <a href = "https://platform.openai.com/docs/api-reference/assistants/createAssistant"> Equivalent to OpenAI's create assistants. </a>
responses:
"200":
description:
content:
application/json:
schema:
$ref: "specs/assistants.yaml#/components/schemas/CreateAssistantResponse"
/assistants/{assistant_id}:
get:
@ -501,6 +515,14 @@ paths:
summary: Retrieve assistant
description: |
Retrieves an assistant. <a href = "https://platform.openai.com/docs/api-reference/assistants/getAssistant"> Equivalent to OpenAI's retrieve assistants. </a>
responses:
"200":
description:
content:
application/json:
schema:
$ref: "specs/assistants.yaml#/components/schemas/RetrieveAssistantResponse"
post:
operationId: modifyAssistant
tags:
@ -515,6 +537,13 @@ paths:
summary: Delete assistant
description: |
Delete an assistant. <a href = "https://platform.openai.com/docs/api-reference/assistants/deleteAssistant"> Equivalent to OpenAI's delete assistant. </a>
responses:
"200":
description:
content:
application/json:
schema:
$ref: "specs/assistants.yaml#/components/schemas/ModifyAssistantResponse"
### MESSAGES
/threads/{thread_id}/messages:

View File

@ -59,3 +59,83 @@ components:
- name
- models
- events
ListAssistantsResponse:
type: object
properties:
id:
type: string
description: "The identifier of the model that was deleted."
example: "model-zephyr-7B"
object:
type: string
description: "Type of the object, indicating it's a model."
default: "model"
deleted:
type: boolean
description: "Indicates whether the model was successfully deleted."
example: true
CreateAssistantResponse:
type: object
properties:
id:
type: string
description: "The identifier of the model that was deleted."
example: "model-zephyr-7B"
object:
type: string
description: "Type of the object, indicating it's a model."
default: "model"
deleted:
type: boolean
description: "Indicates whether the model was successfully deleted."
example: true
RetrieveAssistantResponse:
type: object
properties:
id:
type: string
description: "The identifier of the model that was deleted."
example: "model-zephyr-7B"
object:
type: string
description: "Type of the object, indicating it's a model."
default: "model"
deleted:
type: boolean
description: "Indicates whether the model was successfully deleted."
example: true
ModifyAssistantResponse:
type: object
properties:
id:
type: string
description: "The identifier of the model that was deleted."
example: "model-zephyr-7B"
object:
type: string
description: "Type of the object, indicating it's a model."
default: "model"
deleted:
type: boolean
description: "Indicates whether the model was successfully deleted."
example: true
DeleteAssistantResponse:
type: object
properties:
id:
type: string
description: "The identifier of the model that was deleted."
example: "model-zephyr-7B"
object:
type: string
description: "Type of the object, indicating it's a model."
default: "model"
deleted:
type: boolean
description: "Indicates whether the model was successfully deleted."
example: true