From cb458ebd35c56a91f6f6723ade22527b28952421 Mon Sep 17 00:00:00 2001 From: Shawn Fang <45607042+mssfang@users.noreply.github.com> Date: Tue, 4 Jun 2024 11:35:09 -0700 Subject: [PATCH] [OAI-Assistant] Added Missing annotation and delete unnecessary annotation (#29297) * fixed the error * npx tsp compile updates --------- Co-authored-by: Travis Wilson Co-authored-by: Jose Alvarez --- .../tools/tool_resources.tsp | 1 + .../vector_stores/files/routes.tsp | 1 - .../assistants_generated.json | 23 +++++++++++++------ .../assistants_generated.yaml | 11 ++++++--- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/specification/ai/OpenAI.Assistants/tools/tool_resources.tsp b/specification/ai/OpenAI.Assistants/tools/tool_resources.tsp index b3b5b81c9164..55f43651c27f 100644 --- a/specification/ai/OpenAI.Assistants/tools/tool_resources.tsp +++ b/specification/ai/OpenAI.Assistants/tools/tool_resources.tsp @@ -160,5 +160,6 @@ model UpdateCodeInterpreterToolResourceOptions { model UpdateFileSearchToolResourceOptions { /** A list of vector store IDs to override the current list of the assistant. */ @maxItems(1) + @encodedName("application/json", "vector_store_ids") vectorStoreIds?: string[]; } diff --git a/specification/ai/OpenAI.Assistants/vector_stores/files/routes.tsp b/specification/ai/OpenAI.Assistants/vector_stores/files/routes.tsp index 2f0d81651415..54730eac9e85 100644 --- a/specification/ai/OpenAI.Assistants/vector_stores/files/routes.tsp +++ b/specification/ai/OpenAI.Assistants/vector_stores/files/routes.tsp @@ -45,7 +45,6 @@ op createVectorStoreFile( /** A File ID that the vector store should use. Useful for tools like `file_search` that can access files. */ @encodedName("application/json", "file_id") - @body fileId: string, ): VectorStoreFile; diff --git a/specification/ai/data-plane/OpenAI.Assistants/OpenApiV2/preview/2024-05-01-preview/assistants_generated.json b/specification/ai/data-plane/OpenAI.Assistants/OpenApiV2/preview/2024-05-01-preview/assistants_generated.json index 3784be740a46..b0fe2a911183 100644 --- a/specification/ai/data-plane/OpenAI.Assistants/OpenApiV2/preview/2024-05-01-preview/assistants_generated.json +++ b/specification/ai/data-plane/OpenAI.Assistants/OpenApiV2/preview/2024-05-01-preview/assistants_generated.json @@ -1941,14 +1941,22 @@ "type": "string" }, { - "name": "file_id", + "name": "body", "in": "body", - "description": "A File ID that the vector store should use. Useful for tools like `file_search` that can access files.", "required": true, "schema": { - "type": "string" - }, - "x-ms-client-name": "fileId" + "type": "object", + "properties": { + "file_id": { + "type": "string", + "description": "A File ID that the vector store should use. Useful for tools like `file_search` that can access files.", + "x-ms-client-name": "fileId" + } + }, + "required": [ + "file_id" + ] + } } ], "responses": { @@ -4590,13 +4598,14 @@ "type": "object", "description": "Request object to update `file_search` tool resources.", "properties": { - "vectorStoreIds": { + "vector_store_ids": { "type": "array", "description": "A list of vector store IDs to override the current list of the assistant.", "maxItems": 1, "items": { "type": "string" - } + }, + "x-ms-client-name": "vectorStoreIds" } } }, diff --git a/specification/ai/data-plane/OpenAI.Assistants/OpenApiV3/2024-05-01-preview/assistants_generated.yaml b/specification/ai/data-plane/OpenAI.Assistants/OpenApiV3/2024-05-01-preview/assistants_generated.yaml index c4bafc803e41..050d1237ad90 100644 --- a/specification/ai/data-plane/OpenAI.Assistants/OpenApiV3/2024-05-01-preview/assistants_generated.yaml +++ b/specification/ai/data-plane/OpenAI.Assistants/OpenApiV3/2024-05-01-preview/assistants_generated.yaml @@ -1228,12 +1228,17 @@ paths: schema: $ref: '#/components/schemas/VectorStoreFile' requestBody: - description: A File ID that the vector store should use. Useful for tools like `file_search` that can access files. required: true content: application/json: schema: - type: string + type: object + properties: + file_id: + type: string + description: A File ID that the vector store should use. Useful for tools like `file_search` that can access files. + required: + - file_id /vector_stores/{vectorStoreId}/files/{fileId}: get: operationId: getVectorStoreFile @@ -3844,7 +3849,7 @@ components: UpdateFileSearchToolResourceOptions: type: object properties: - vectorStoreIds: + vector_store_ids: type: array items: type: string