From 40ba442716105d7d58249d02e0c274eb6d98fe01 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Dec 2024 18:20:11 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- src/libs/OpenAI/openapi.yaml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/libs/OpenAI/openapi.yaml b/src/libs/OpenAI/openapi.yaml index d1e8f35..b4fdd7a 100644 --- a/src/libs/OpenAI/openapi.yaml +++ b/src/libs/OpenAI/openapi.yaml @@ -1331,7 +1331,7 @@ paths: examples: request: curl: "curl \"https://api.openai.com/v1/organization/costs?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.costs.result\",\n \"amount\": {\n \"value\": 0.06,\n \"currency\": \"usd\"\n },\n \"line_item\": null,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.costs.result\",\n \"amount\": {\n \"value\": 0.06,\n \"currency\": \"usd\"\n },\n \"line_item\": null,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" /organization/invites: get: tags: @@ -2383,7 +2383,7 @@ paths: examples: request: curl: "curl \"https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.audio_transcriptions.result\",\n \"seconds\": 20,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.audio_transcriptions.result\",\n \"seconds\": 20,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" /organization/usage/code_interpreter_sessions: get: tags: @@ -2452,7 +2452,7 @@ paths: examples: request: curl: "curl \"https://api.openai.com/v1/organization/usage/code_interpreter_sessions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.code_interpreter_sessions.result\",\n \"sessions\": 1,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.code_interpreter_sessions.result\",\n \"sessions\": 1,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" /organization/usage/completions: get: tags: @@ -2551,7 +2551,7 @@ paths: examples: request: curl: "curl \"https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.completions.result\",\n \"input_tokens\": 1000,\n \"output_tokens\": 500,\n \"input_cached_tokens\": 800,\n \"num_model_requests\": 5,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null,\n \"batch\": null\n }\n ]\n }\n ],\n \"has_more\": true,\n \"next_page\": \"AAAAAGdGxdEiJdKOAAAAAGcqsYA=\"\n}\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.completions.result\",\n \"input_tokens\": 1000,\n \"output_tokens\": 500,\n \"input_cached_tokens\": 800,\n \"num_model_requests\": 5,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null,\n \"batch\": null\n }\n ]\n }\n ],\n \"has_more\": true,\n \"next_page\": \"AAAAAGdGxdEiJdKOAAAAAGcqsYA=\"\n}\n" /organization/usage/embeddings: get: tags: @@ -2644,7 +2644,7 @@ paths: examples: request: curl: "curl \"https://api.openai.com/v1/organization/usage/embeddings?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.embeddings.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.embeddings.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" /organization/usage/images: get: tags: @@ -2763,7 +2763,7 @@ paths: examples: request: curl: "curl \"https://api.openai.com/v1/organization/usage/images?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.images.result\",\n \"images\": 2,\n \"num_model_requests\": 2,\n \"size\": null,\n \"source\": null,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.images.result\",\n \"images\": 2,\n \"num_model_requests\": 2,\n \"size\": null,\n \"source\": null,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" /organization/usage/moderations: get: tags: @@ -2856,7 +2856,7 @@ paths: examples: request: curl: "curl \"https://api.openai.com/v1/organization/usage/moderations?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.moderations.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.moderations.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" /organization/usage/vector_stores: get: tags: @@ -2925,7 +2925,7 @@ paths: examples: request: curl: "curl \"https://api.openai.com/v1/organization/usage/vector_stores?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" - response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.vector_stores.result\",\n \"usage_bytes\": 1024,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"organization.usage.vector_stores.result\",\n \"usage_bytes\": 1024,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" /organization/users: get: tags: @@ -5979,7 +5979,7 @@ components: description: The aggregated costs details of the specific time bucket. x-oaiMeta: name: Costs object - example: "{\n \"object\": \"orgainzation.costs.result\",\n \"amount\": {\n \"value\": 0.06,\n \"currency\": \"usd\"\n },\n \"line_item\": \"Image models\",\n \"project_id\": \"proj_abc\"\n}\n" + example: "{\n \"object\": \"organization.costs.result\",\n \"amount\": {\n \"value\": 0.06,\n \"currency\": \"usd\"\n },\n \"line_item\": \"Image models\",\n \"project_id\": \"proj_abc\"\n}\n" CreateAssistantRequest: required: - model @@ -13385,7 +13385,7 @@ components: description: The aggregated audio speeches usage details of the specific time bucket. x-oaiMeta: name: Audio speeches usage object - example: "{\n \"object\": \"orgainzation.usage.audio_speeches.result\",\n \"characters\": 45,\n \"num_model_requests\": 1,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"tts-1\"\n}\n" + example: "{\n \"object\": \"organization.usage.audio_speeches.result\",\n \"characters\": 45,\n \"num_model_requests\": 1,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"tts-1\"\n}\n" UsageAudioTranscriptionsResult: required: - object @@ -13418,7 +13418,7 @@ components: description: The aggregated audio transcriptions usage details of the specific time bucket. x-oaiMeta: name: Audio transcriptions usage object - example: "{\n \"object\": \"orgainzation.usage.audio_transcriptions.result\",\n \"seconds\": 10,\n \"num_model_requests\": 1,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"tts-1\"\n}\n" + example: "{\n \"object\": \"organization.usage.audio_transcriptions.result\",\n \"seconds\": 10,\n \"num_model_requests\": 1,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"tts-1\"\n}\n" UsageCodeInterpreterSessionsResult: required: - object @@ -13438,7 +13438,7 @@ components: description: The aggregated code interpreter sessions usage details of the specific time bucket. x-oaiMeta: name: Code interpreter sessions usage object - example: "{\n \"object\": \"orgainzation.usage.code_interpreter_sessions.result\",\n \"sessions\": 1,\n \"project_id\": \"proj_abc\"\n}\n" + example: "{\n \"object\": \"organization.usage.code_interpreter_sessions.result\",\n \"sessions\": 1,\n \"project_id\": \"proj_abc\"\n}\n" UsageCompletionsResult: required: - object @@ -13481,7 +13481,7 @@ components: description: The aggregated completions usage details of the specific time bucket. x-oaiMeta: name: Completions usage object - example: "{\n \"object\": \"orgainzation.usage.completions.result\",\n \"input_tokens\": 5000,\n \"output_tokens\": 1000,\n \"input_cached_tokens\": 4000,\n \"num_model_requests\": 5,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"batch\": false\n}\n" + example: "{\n \"object\": \"organization.usage.completions.result\",\n \"input_tokens\": 5000,\n \"output_tokens\": 1000,\n \"input_cached_tokens\": 4000,\n \"num_model_requests\": 5,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"batch\": false\n}\n" UsageEmbeddingsResult: required: - object @@ -13514,7 +13514,7 @@ components: description: The aggregated embeddings usage details of the specific time bucket. x-oaiMeta: name: Embeddings usage object - example: "{\n \"object\": \"orgainzation.usage.embeddings.result\",\n \"input_tokens\": 20,\n \"num_model_requests\": 2,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"text-embedding-ada-002-v2\"\n}\n" + example: "{\n \"object\": \"organization.usage.embeddings.result\",\n \"input_tokens\": 20,\n \"num_model_requests\": 2,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"text-embedding-ada-002-v2\"\n}\n" UsageImagesResult: required: - object @@ -13553,7 +13553,7 @@ components: description: The aggregated images usage details of the specific time bucket. x-oaiMeta: name: Images usage object - example: "{\n \"object\": \"orgainzation.usage.images.result\",\n \"images\": 2,\n \"num_model_requests\": 2,\n \"size\": \"1024x1024\",\n \"source\": \"image.generation\",\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"dall-e-3\"\n}\n" + example: "{\n \"object\": \"organization.usage.images.result\",\n \"images\": 2,\n \"num_model_requests\": 2,\n \"size\": \"1024x1024\",\n \"source\": \"image.generation\",\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"dall-e-3\"\n}\n" UsageModerationsResult: required: - object @@ -13586,7 +13586,7 @@ components: description: The aggregated moderations usage details of the specific time bucket. x-oaiMeta: name: Moderations usage object - example: "{\n \"object\": \"orgainzation.usage.moderations.result\",\n \"input_tokens\": 20,\n \"num_model_requests\": 2,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"text-moderation\"\n}\n" + example: "{\n \"object\": \"organization.usage.moderations.result\",\n \"input_tokens\": 20,\n \"num_model_requests\": 2,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"text-moderation\"\n}\n" UsageResponse: required: - object @@ -13655,7 +13655,7 @@ components: description: The aggregated vector stores usage details of the specific time bucket. x-oaiMeta: name: Vector stores usage object - example: "{\n \"object\": \"orgainzation.usage.vector_stores.result\",\n \"usage_bytes\": 1024,\n \"project_id\": \"proj_abc\"\n}\n" + example: "{\n \"object\": \"organization.usage.vector_stores.result\",\n \"usage_bytes\": 1024,\n \"project_id\": \"proj_abc\"\n}\n" User: required: - object