Assistant Noob Supreme
Assistant Noob Supreme · GPT 작업
OpenAI Api
The OpenAI REST API
GET /assistantslistAssistantsReturns a list of assistants.
POST /assistantscreateAssistantCreates a new assistant.
GET /assistants/{assistant_id}getAssistantRetrieves an assistant.
PATCH /assistants/{assistant_id}modifyAssistantModifies an assistant.
DELETE /assistants/{assistant_id}deleteAssistantDeletes an assistant.
GET /assistants/{assistant_id}/fileslistAssistantFilesReturns a list of assistant files.
POST /assistants/{assistant_id}/filescreateAssistantFileCreate an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants).
GET /assistants/{assistant_id}/files/{file_id}getAssistantFileRetrieves an AssistantFile.
DELETE /assistants/{assistant_id}/files/{file_id}deleteAssistantFileDelete an assistant file.
GET /threads/{thread_id}/messages/{message_id}/fileslistMessageFilesReturns a list of message files.
GET /threads/{thread_id}/messages/{message_id}/files/{file_id}getMessageFileRetrieves a message file.
원본 API 스키마
{
"openapi": "3.0.0",
"info": {
"title": "OpenAI Api",
"description": "The OpenAI REST API",
"version": "v2.0.0"
},
"servers": [
{
"url": "https://api.openai.com/v1"
}
],
"paths": {
"/assistants": {
"get": {
"operationId": "listAssistants",
"description": "Returns a list of assistants.",
"parameters": [
{
"name": "limit",
"in": "query",
"description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n",
"required": false,
"schema": {
"type": "integer",
"default": 20
}
},
{
"name": "order",
"in": "query",
"description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n",
"schema": {
"type": "string",
"default": "desc",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "after",
"in": "query",
"description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n",
"schema": {
"type": "string"
}
},
{
"name": "before",
"in": "query",
"description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListAssistantsResponse"
}
}
}
}
}
},
"post": {
"operationId": "createAssistant",
"description": "Creates a new assistant.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAssistantRequest"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssistantObject"
}
}
}
}
}
}
},
"/assistants/{assistant_id}": {
"get": {
"operationId": "getAssistant",
"description": "Retrieves an assistant.",
"parameters": [
{
"in": "path",
"name": "assistant_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the assistant to retrieve."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssistantObject"
}
}
}
}
}
},
"patch": {
"operationId": "modifyAssistant",
"description": "Modifies an assistant.",
"parameters": [
{
"in": "path",
"name": "assistant_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the assistant to update."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModifyAssistantRequest"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssistantObject"
}
}
}
}
}
},
"delete": {
"operationId": "deleteAssistant",
"description": "Deletes an assistant.",
"parameters": [
{
"in": "path",
"name": "assistant_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the assistant to delete."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteAssistantResponse"
}
}
}
}
}
}
},
"/assistants/{assistant_id}/files": {
"get": {
"operationId": "listAssistantFiles",
"description": "Returns a list of assistant files.",
"parameters": [
{
"in": "path",
"name": "assistant_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the assistant to retrieve files for."
},
{
"name": "limit",
"in": "query",
"description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n",
"required": false,
"schema": {
"type": "integer",
"default": 20
}
},
{
"name": "order",
"in": "query",
"description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n",
"schema": {
"type": "string",
"default": "desc",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "after",
"in": "query",
"description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n",
"schema": {
"type": "string"
}
},
{
"name": "before",
"in": "query",
"description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListAssistantFilesResponse"
}
}
}
}
}
},
"post": {
"operationId": "createAssistantFile",
"description": "Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants).",
"parameters": [
{
"in": "path",
"name": "assistant_id",
"required": true,
"schema": {
"type": "string",
"example": "file-AF1WoRqd3aJAHsqc9NY7iL8F"
}
}
]
}
},
"/assistants/{assistant_id}/files/{file_id}": {
"get": {
"operationId": "getAssistantFile",
"description": "Retrieves an AssistantFile.",
"parameters": [
{
"in": "path",
"name": "assistant_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the assistant who the file belongs to."
},
{
"in": "path",
"name": "file_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the file we're getting."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssistantFileObject"
}
}
}
}
}
},
"delete": {
"operationId": "deleteAssistantFile",
"description": "Delete an assistant file.",
"parameters": [
{
"in": "path",
"name": "assistant_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the assistant that the file belongs to."
},
{
"in": "path",
"name": "file_id",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the file to delete."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteAssistantFileResponse"
}
}
}
}
}
}
},
"/threads/{thread_id}/messages/{message_id}/files": {
"get": {
"operationId": "listMessageFiles",
"description": "Returns a list of message files.",
"parameters": [
{
"name": "thread_id",
"in": "path",
"description": "The ID of the thread that the message and files belong to.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "message_id",
"in": "path",
"description": "The ID of the message that the files belongs to.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n",
"required": false,
"schema": {
"type": "integer",
"default": 20
}
},
{
"name": "order",
"in": "query",
"description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n",
"schema": {
"type": "string",
"default": "desc",
"enum": [
"asc",
"desc"
]
}
},
{
"name": "after",
"in": "query",
"description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n",
"schema": {
"type": "string"
}
},
{
"name": "before",
"in": "query",
"description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListMessageFilesResponse"
}
}
}
}
}
}
},
"/threads/{thread_id}/messages/{message_id}/files/{file_id}": {
"get": {
"operationId": "getMessageFile",
"description": "Retrieves a message file.",
"parameters": [
{
"in": "path",
"name": "thread_id",
"required": true,
"schema": {
"type": "string",
"example": "thread_AF1WoRqd3aJAHsqc9NY7iL8F"
},
"description": "The ID of the thread to which the message and File belong."
},
{
"in": "path",
"name": "message_id",
"required": true,
"schema": {
"type": "string",
"example": "msg_AF1WoRqd3aJAHsqc9NY7iL8F"
},
"description": "The ID of the message the file belongs to."
},
{
"in": "path",
"name": "file_id",
"required": true,
"schema": {
"type": "string",
"example": "file-AF1WoRqd3aJAHsqc9NY7iL8F"
},
"description": "The ID of the file being retrieved."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageFileObject"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"AssistantObject": {
"type": "object",
"title": "Assistant",
"description": "Represents an `assistant` that can call the model and use tools.",
"properties": {
"id": {
"description": "The identifier, which can be referenced in API endpoints.",
"type": "string"
},
"object": {
"description": "The object type, which is always `assistant`.",
"type": "string",
"enum": [
"assistant"
]
},
"created_at": {
"description": "The Unix timestamp (in seconds) for when the assistant was created.",
"type": "integer"
},
"name": {
"description": "The name of the assistant. The maximum length is 256 characters.\n",
"type": "string",
"maxLength": 256,
"nullable": true
},
"description": {
"description": "The description of the assistant. The maximum length is 512 characters.\n",
"type": "string",
"maxLength": 512,
"nullable": true
},
"model": {
"description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n",
"type": "string"
},
"instructions": {
"description": "The system instructions that the assistant uses. The maximum length is 32768 characters.\n",
"type": "string",
"maxLength": 32768,
"nullable": true
},
"tools": {
"description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.\n",
"default": [],
"type": "array",
"maxItems": 128,
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/AssistantToolsCode"
},
{
"$ref": "#/components/schemas/AssistantToolsRetrieval"
},
{
"$ref": "#/components/schemas/AssistantToolsFunction"
}
],
"x-oaiExpandable": true
}
},
"file_ids": {
"description": "A list of [file](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order.\n",
"default": [],
"type": "array",
"maxItems": 20,
"items": {
"type": "string"
}
},
"metadata": {
"description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n",
"type": "object",
"x-oaiTypeLabel": "map",
"nullable": true
}
},
"required": [
"id",
"object",
"created_at",
"name",
"description",
"model",
"instructions",
"tools",
"file_ids",
"metadata"
],
"x-oaiMeta": {
"name": "The assistant object",
"beta": true,
"example": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698984975,\n \"name\": \"Math Tutor\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"file_ids\": [],\n \"metadata\": {}\n}\n"
}
},
"CreateAssistantRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"model": {
"description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n",
"anyOf": [
{
"type": "string"
}
]
},
"name": {
"description": "The name of the assistant. The maximum length is 256 characters.\n",
"type": "string",
"nullable": true,
"maxLength": 256
},
"description": {
"description": "The description of the assistant. The maximum length is 512 characters.\n",
"type": "string",
"nullable": true,
"maxLength": 512
},
"instructions": {
"description": "The system instructions that the assistant uses. The maximum length is 32768 characters.\n",
"type": "string",
"nullable": true,
"maxLength": 32768
},
"tools": {
"description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.\n",
"default": [],
"type": "array",
"maxItems": 128,
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/AssistantToolsCode"
},
{
"$ref": "#/components/schemas/AssistantToolsRetrieval"
},
{
"$ref": "#/components/schemas/AssistantToolsFunction"
}
],
"x-oaiExpandable": true
}
},
"file_ids": {
"description": "A list of [file](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order.\n",
"default": [],
"maxItems": 20,
"type": "array",
"items": {
"type": "string"
}
},
"metadata": {
"description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n",
"type": "object",
"x-oaiTypeLabel": "map",
"nullable": true
}
},
"required": [
"model"
]
},
"ModifyAssistantRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"model": {
"description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n",
"anyOf": [
{
"type": "string"
}
]
},
"name": {
"description": "The name of the assistant. The maximum length is 256 characters.\n",
"type": "string",
"nullable": true,
"maxLength": 256
},
"description": {
"description": "The description of the assistant. The maximum length is 512 characters.\n",
"type": "string",
"nullable": true,
"maxLength": 512
},
"instructions": {
"description": "The system instructions that the assistant uses. The maximum length is 32768 characters.\n",
"type": "string",
"nullable": true,
"maxLength": 32768
},
"tools": {
"description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.\n",
"default": [],
"type": "array",
"maxItems": 128,
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/AssistantToolsCode"
},
{
"$ref": "#/components/schemas/AssistantToolsRetrieval"
},
{
"$ref": "#/components/schemas/AssistantToolsFunction"
}
],
"x-oaiExpandable": true
}
},
"file_ids": {
"description": "A list of [File](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order. If a file was previosuly attached to the list but does not show up in the list, it will be deleted from the assistant.\n",
"default": [],
"type": "array",
"maxItems": 20,
"items": {
"type": "string"
}
},
"metadata": {
"description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n",
"type": "object",
"x-oaiTypeLabel": "map",
"nullable": true
}
}
},
"DeleteAssistantResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean"
},
"object": {
"type": "string",
"enum": [
"assistant.deleted"
]
}
},
"required": [
"id",
"object",
"deleted"
]
},
"ListAssistantsResponse": {
"type": "object",
"properties": {
"object": {
"type": "string",
"example": "list"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AssistantObject"
}
},
"first_id": {
"type": "string",
"example": "asst_hLBK7PXBv5Lr2NQT7KLY0ag1"
},
"last_id": {
"type": "string",
"example": "asst_QLoItBbqwyAJEzlTy4y9kOMM"
},
"has_more": {
"type": "boolean",
"example": false
}
},
"required": [
"object",
"data",
"first_id",
"last_id",
"has_more"
],
"x-oaiMeta": {
"name": "List assistants response object",
"group": "chat",
"example": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698982736,\n \"name\": \"Coding Tutor\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n },\n {\n \"id\": \"asst_abc456\",\n \"object\": \"assistant\",\n \"created_at\": 1698982718,\n \"name\": \"My Assistant\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n },\n {\n \"id\": \"asst_abc789\",\n \"object\": \"assistant\",\n \"created_at\": 1698982643,\n \"name\": null,\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": null,\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n }\n ],\n \"first_id\": \"asst_abc123\",\n \"last_id\": \"asst_abc789\",\n \"has_more\": false\n}\n"
}
},
"AssistantFileObject": {
"type": "object",
"title": "Assistant files",
"description": "A list of [Files](/docs/api-reference/files) attached to an `assistant`.",
"properties": {
"id": {
"description": "The identifier, which can be referenced in API endpoints.",
"type": "string"
},
"object": {
"description": "The object type, which is always `assistant.file`.",
"type": "string",
"enum": [
"assistant.file"
]
},
"created_at": {
"description": "The Unix timestamp (in seconds) for when the assistant file was created.",
"type": "integer"
},
"assistant_id": {
"description": "The assistant ID that the file is attached to.",
"type": "string"
}
},
"required": [
"id",
"object",
"created_at",
"assistant_id"
],
"x-oaiMeta": {
"name": "The assistant file object",
"beta": true,
"example": "{\n \"id\": \"file-wB6RM6wHdA49HfS2DJ9fEyrH\",\n \"object\": \"assistant.file\",\n \"created_at\": 1699055364,\n \"assistant_id\": \"asst_FBOFvAOHhwEWMghbMGseaPGQ\"\n}\n"
}
},
"DeleteAssistantFileResponse": {
"type": "object",
"description": "Deletes the association between the assistant and the file, but does not delete the [File](/docs/api-reference/files) object itself.",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean"
},
"object": {
"type": "string",
"enum": [
"assistant.file.deleted"
]
}
},
"required": [
"id",
"object",
"deleted"
]
},
"ListAssistantFilesResponse": {
"properties": {
"object": {
"type": "string",
"example": "list"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AssistantFileObject"
}
},
"first_id": {
"type": "string",
"example": "file-hLBK7PXBv5Lr2NQT7KLY0ag1"
},
"last_id": {
"type": "string",
"example": "file-QLoItBbqwyAJEzlTy4y9kOMM"
},
"has_more": {
"type": "boolean",
"example": false
}
},
"required": [
"object",
"data",
"items",
"first_id",
"last_id",
"has_more"
]
},
"MessageFileObject": {
"type": "object",
"title": "Message files",
"description": "A list of files attached to a `message`.",
"properties": {
"id": {
"description": "The identifier, which can be referenced in API endpoints.",
"type": "string"
},
"object": {
"description": "The object type, which is always `thread.message.file`.",
"type": "string",
"enum": [
"thread.message.file"
]
},
"created_at": {
"description": "The Unix timestamp (in seconds) for when the message file was created.",
"type": "integer"
},
"message_id": {
"description": "The ID of the [message](/docs/api-reference/messages) that the [File](/docs/api-reference/files) is attached to.",
"type": "string"
}
},
"required": [
"id",
"object",
"created_at",
"message_id"
],
"x-oaiMeta": {
"name": "The message file object",
"beta": true,
"example": "{\n \"id\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n \"object\": \"thread.message.file\",\n \"created_at\": 1698107661,\n \"message_id\": \"message_QLoItBbqwyAJEzlTy4y9kOMM\",\n \"file_id\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\"\n}\n"
}
},
"ListMessageFilesResponse": {
"properties": {
"object": {
"type": "string",
"example": "list"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MessageFileObject"
}
},
"first_id": {
"type": "string",
"example": "file-hLBK7PXBv5Lr2NQT7KLY0ag1"
},
"last_id": {
"type": "string",
"example": "file-QLoItBbqwyAJEzlTy4y9kOMM"
},
"has_more": {
"type": "boolean",
"example": false
}
},
"required": [
"object",
"data",
"items",
"first_id",
"last_id",
"has_more"
]
}
}
}
}