diff --git a/swagger/docs.go b/swagger/docs.go index b894258a..513a6dea 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -213,6 +213,43 @@ const docTemplate = `{ } } }, + "/v1/files/{file_id}": { + "get": { + "summary": "Returns information about a specific file.", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/openai.File" + } + } + } + }, + "delete": { + "summary": "Delete a file.", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/openai.DeleteStatus" + } + } + } + } + }, + "/v1/files/{file_id}/content": { + "get": { + "summary": "Returns information about a specific file.", + "responses": { + "200": { + "description": "file", + "schema": { + "type": "string" + } + } + } + } + }, "/v1/images/generations": { "post": { "summary": "Creates an image given a prompt.", @@ -237,6 +274,19 @@ const docTemplate = `{ } } }, + "/v1/models": { + "get": { + "summary": "List and describe the various models available in the API.", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.ModelsDataResponse" + } + } + } + } + }, "/v1/text-to-speech/{voice-id}": { "post": { "summary": "Generates audio from the input text.", @@ -491,6 +541,49 @@ const docTemplate = `{ } } }, + "openai.DeleteStatus": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "type": "string" + } + } + }, + "openai.File": { + "type": "object", + "properties": { + "bytes": { + "description": "Size of the file in bytes", + "type": "integer" + }, + "created_at": { + "description": "The time at which the file was created", + "type": "string" + }, + "filename": { + "description": "The name of the file", + "type": "string" + }, + "id": { + "description": "Unique identifier for the file", + "type": "string" + }, + "object": { + "description": "Type of the object (e.g., \"file\")", + "type": "string" + }, + "purpose": { + "description": "The purpose of the file (e.g., \"fine-tune\", \"classifications\", etc.)", + "type": "string" + } + } + }, "openai.Tool": { "type": "object", "properties": { @@ -601,6 +694,31 @@ const docTemplate = `{ } } }, + "schema.ModelsDataResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/schema.OpenAIModel" + } + }, + "object": { + "type": "string" + } + } + }, + "schema.OpenAIModel": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "object": { + "type": "string" + } + } + }, "schema.OpenAIRequest": { "type": "object", "required": [ diff --git a/swagger/swagger.json b/swagger/swagger.json index 5e919ef8..aedfd438 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -206,6 +206,43 @@ } } }, + "/v1/files/{file_id}": { + "get": { + "summary": "Returns information about a specific file.", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/openai.File" + } + } + } + }, + "delete": { + "summary": "Delete a file.", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/openai.DeleteStatus" + } + } + } + } + }, + "/v1/files/{file_id}/content": { + "get": { + "summary": "Returns information about a specific file.", + "responses": { + "200": { + "description": "file", + "schema": { + "type": "string" + } + } + } + } + }, "/v1/images/generations": { "post": { "summary": "Creates an image given a prompt.", @@ -230,6 +267,19 @@ } } }, + "/v1/models": { + "get": { + "summary": "List and describe the various models available in the API.", + "responses": { + "200": { + "description": "Response", + "schema": { + "$ref": "#/definitions/schema.ModelsDataResponse" + } + } + } + } + }, "/v1/text-to-speech/{voice-id}": { "post": { "summary": "Generates audio from the input text.", @@ -484,6 +534,49 @@ } } }, + "openai.DeleteStatus": { + "type": "object", + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "type": "string" + } + } + }, + "openai.File": { + "type": "object", + "properties": { + "bytes": { + "description": "Size of the file in bytes", + "type": "integer" + }, + "created_at": { + "description": "The time at which the file was created", + "type": "string" + }, + "filename": { + "description": "The name of the file", + "type": "string" + }, + "id": { + "description": "Unique identifier for the file", + "type": "string" + }, + "object": { + "description": "Type of the object (e.g., \"file\")", + "type": "string" + }, + "purpose": { + "description": "The purpose of the file (e.g., \"fine-tune\", \"classifications\", etc.)", + "type": "string" + } + } + }, "openai.Tool": { "type": "object", "properties": { @@ -594,6 +687,31 @@ } } }, + "schema.ModelsDataResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/schema.OpenAIModel" + } + }, + "object": { + "type": "string" + } + } + }, + "schema.OpenAIModel": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "object": { + "type": "string" + } + } + }, "schema.OpenAIRequest": { "type": "object", "required": [ diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 18a51a04..9c23c811 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -148,6 +148,37 @@ definitions: $ref: '#/definitions/openai.Tool' type: array type: object + openai.DeleteStatus: + properties: + deleted: + type: boolean + id: + type: string + object: + type: string + type: object + openai.File: + properties: + bytes: + description: Size of the file in bytes + type: integer + created_at: + description: The time at which the file was created + type: string + filename: + description: The name of the file + type: string + id: + description: Unique identifier for the file + type: string + object: + description: Type of the object (e.g., "file") + type: string + purpose: + description: The purpose of the file (e.g., "fine-tune", "classifications", + etc.) + type: string + type: object openai.Tool: properties: type: @@ -222,6 +253,22 @@ definitions: $ref: '#/definitions/schema.ToolCall' type: array type: object + schema.ModelsDataResponse: + properties: + data: + items: + $ref: '#/definitions/schema.OpenAIModel' + type: array + object: + type: string + type: object + schema.OpenAIModel: + properties: + id: + type: string + object: + type: string + type: object schema.OpenAIRequest: properties: backend: @@ -533,6 +580,29 @@ paths: $ref: '#/definitions/schema.OpenAIResponse' summary: Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + /v1/files/{file_id}: + delete: + responses: + "200": + description: Response + schema: + $ref: '#/definitions/openai.DeleteStatus' + summary: Delete a file. + get: + responses: + "200": + description: Response + schema: + $ref: '#/definitions/openai.File' + summary: Returns information about a specific file. + /v1/files/{file_id}/content: + get: + responses: + "200": + description: file + schema: + type: string + summary: Returns information about a specific file. /v1/images/generations: post: parameters: @@ -548,6 +618,14 @@ paths: schema: $ref: '#/definitions/schema.OpenAIResponse' summary: Creates an image given a prompt. + /v1/models: + get: + responses: + "200": + description: Response + schema: + $ref: '#/definitions/schema.ModelsDataResponse' + summary: List and describe the various models available in the API. /v1/text-to-speech/{voice-id}: post: parameters: