swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Assistants API schemes: - https tags: - name: Assistants paths: /assistants: get: operationId: microsoftAzureListassistants description: Gets a list of assistants that were previously created. 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. required: false type: integer format: int32 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. required: false type: string default: desc enum: - asc - desc x-ms-enum: name: ListSortOrder modelAsString: true values: - name: ascending value: asc description: Specifies an ascending sort order. - name: descending value: desc description: Specifies a descending sort order. - 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. required: false 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. required: false type: string responses: '200': description: The requested list of assistants. schema: type: object description: The response data for a requested list of items. properties: object: type: string description: The object type, which is always list. enum: - list x-ms-enum: modelAsString: false data: type: array description: The requested list of items. items: $ref: '#/definitions/Assistant' first_id: type: string description: The first ID represented in this list. x-ms-client-name: firstId last_id: type: string description: The last ID represented in this list. x-ms-client-name: lastId has_more: type: boolean description: A value indicating whether there are additional values available not captured in this list. x-ms-client-name: hasMore required: - object - data - first_id - last_id - has_more summary: Microsoft Azure Get Assistants tags: - Assistants post: operationId: microsoftAzureCreateassistant description: Creates a new assistant. parameters: - name: body in: body required: true schema: $ref: '#/definitions/AssistantCreationOptions' responses: '200': description: The new assistant instance. schema: $ref: '#/definitions/Assistant' summary: Microsoft Azure Post Assistants tags: - Assistants /assistants/{assistantId}: get: operationId: microsoftAzureGetassistant description: Retrieves an existing assistant. parameters: - name: assistantId in: path description: The ID of the assistant to retrieve. required: true type: string responses: '200': description: The requested assistant instance. schema: $ref: '#/definitions/Assistant' summary: Microsoft Azure Get Assistants Assistantid tags: - Assistants post: operationId: microsoftAzureModifyassistant description: Modifies an existing assistant. parameters: - name: assistantId in: path description: The ID of the assistant to modify. required: true type: string - name: modificationOptions in: body description: The details of the modification to perform on the specified assistant. required: true schema: $ref: '#/definitions/AssistantModificationOptions' responses: '200': description: The updated assistant instance. schema: $ref: '#/definitions/Assistant' summary: Microsoft Azure Post Assistants Assistantid tags: - Assistants delete: operationId: microsoftAzureDeleteassistant description: Deletes an assistant. parameters: - name: assistantId in: path description: The ID of the assistant to delete. required: true type: string responses: '200': description: Status information about the requested deletion operation. schema: $ref: '#/definitions/AssistantDeletionStatus' summary: Microsoft Azure Delete Assistants Assistantid tags: - Assistants /assistants/{assistantId}/files: get: operationId: microsoftAzureListassistantfiles description: Gets a list of files attached to a specific assistant, as used by tools that can read files. parameters: - name: assistantId in: path description: The ID of the assistant to retrieve the list of attached files for. required: true 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. required: false type: integer format: int32 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. required: false type: string default: desc enum: - asc - desc x-ms-enum: name: ListSortOrder modelAsString: true values: - name: ascending value: asc description: Specifies an ascending sort order. - name: descending value: desc description: Specifies a descending sort order. - 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. required: false 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. required: false type: string responses: '200': description: The requested list of files attached to the specified assistant. schema: type: object description: The response data for a requested list of items. properties: object: type: string description: The object type, which is always list. enum: - list x-ms-enum: modelAsString: false data: type: array description: The requested list of items. items: $ref: '#/definitions/AssistantFile' first_id: type: string description: The first ID represented in this list. x-ms-client-name: firstId last_id: type: string description: The last ID represented in this list. x-ms-client-name: lastId has_more: type: boolean description: A value indicating whether there are additional values available not captured in this list. x-ms-client-name: hasMore required: - object - data - first_id - last_id - has_more summary: Microsoft Azure Get Assistants Assistantid Files tags: - Assistants post: operationId: microsoftAzureCreateassistantfile description: Attaches a previously uploaded file to an assistant for use by tools that can read files. parameters: - name: assistantId in: path description: The ID of the assistant to attach the file to. required: true type: string - name: body in: body required: true schema: type: object properties: file_id: type: string description: The ID of the previously uploaded file to attach. x-ms-client-name: fileId required: - file_id responses: '200': description: Information about the attached file. schema: $ref: '#/definitions/AssistantFile' summary: Microsoft Azure Post Assistants Assistantid Files tags: - Assistants /assistants/{assistantId}/files/{fileId}: get: operationId: microsoftAzureGetassistantfile description: Retrieves a file attached to an assistant. parameters: - name: assistantId in: path description: The ID of the assistant associated with the attached file. required: true type: string - name: fileId in: path description: The ID of the file to retrieve. required: true type: string responses: '200': description: A representation of the attached file. schema: $ref: '#/definitions/AssistantFile' summary: Microsoft Azure Get Assistants Assistantid Files Fileid tags: - Assistants delete: operationId: microsoftAzureDeleteassistantfile description: Unlinks a previously attached file from an assistant, rendering it unavailable for use by tools that can read
files. parameters: - name: assistantId in: path description: The ID of the assistant from which the specified file should be unlinked. required: true type: string - name: fileId in: path description: The ID of the file to unlink from the specified assistant. required: true type: string responses: '200': description: Status information about the requested file association deletion. schema: $ref: '#/definitions/AssistantFileDeletionStatus' summary: Microsoft Azure Delete Assistants Assistantid Files Fileid tags: - Assistants /assistants/{assistant_id}: get: operationId: microsoftAzureGetAssistant tags: - Assistants summary: Microsoft Azure Retrieves An Assistant parameters: - in: path name: assistant_id required: true schema: type: string description: The ID of the assistant to retrieve. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/assistantObject' x-ms-examples: Create an assistant.: $ref: ./examples/retrieve_assistant.yaml description: Needs a more full description created. delete: operationId: microsoftAzureDeleteAssistant tags: - Assistants summary: Microsoft Azure Delete An Assistant parameters: - in: path name: assistant_id required: true schema: type: string description: The ID of the assistant to delete. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/deleteAssistantResponse' x-ms-examples: Create an assistant.: $ref: ./examples/delete_assistant.yaml description: Needs a more full description created. /threads: post: operationId: microsoftAzureCreateThread tags: - Assistants summary: Microsoft Azure Create A Thread parameters: - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/createThreadRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/threadObject' x-ms-examples: Create a thread.: $ref: ./examples/create_thread.yaml description: Needs a more full description created. /threads/{thread_id}: get: operationId: microsoftAzureGetThread tags: - Assistants summary: Microsoft Azure Retrieves A Thread parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the thread to retrieve. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/threadObject' x-ms-examples: Create a thread.: $ref: ./examples/retrieve_thread.yaml description: Needs a more full description created. post: operationId: microsoftAzureModifyThread tags: - Assistants summary: Microsoft Azure Modifies A Thread parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the thread to modify. Only the `metadata` can be modified. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/modifyThreadRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/threadObject' x-ms-examples: Modify a thread.: $ref: ./examples/modify_thread.yaml description: Needs a more full description created. delete: operationId: microsoftAzureDeleteThread tags: - Assistants summary: Microsoft Azure Delete A Thread parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the thread to delete. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/deleteThreadResponse' x-ms-examples: Delete a thread.: $ref: ./examples/delete_thread.yaml description: Needs a more full description created. /threads/{thread_id}/messages: get: operationId: microsoftAzureListMessages tags: - Assistants summary: Microsoft Azure Returns A List Of Messages For A Given Thread parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the [thread](/docs/api-reference/threads) the messages belong to. - 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. ' 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. ' schema: type: string default: desc enum: - asc - desc x-ms-enum: name: ListMessagesOrder modelAsString: true values: - value: asc description: Order results in ascending order - value: desc description: Order results in descending order - 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. ' 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. ' schema: type: string - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/listMessagesResponse' x-ms-examples: List messages.: $ref: ./examples/list_messages.yaml description: Needs a more full description created. post: operationId: microsoftAzureCreateMessage tags: - Assistants summary: Microsoft Azure Create A Message parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the [thread](/docs/api-reference/threads) to create a message for. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/createMessageRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/messageObject' x-ms-examples: Create a message.: $ref: ./examples/create_message.yaml description: Needs a more full description created. /threads/{thread_id}/messages/{message_id}: get: operationId: microsoftAzureGetMessage tags: - Assistants summary: Microsoft Azure Retrieve A Message parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the [thread](/docs/api-reference/threads) to which this message belongs. - in: path name: message_id required: true schema: type: string description: The ID of the message to retrieve. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/messageObject' x-ms-examples: Retrieve a message.: $ref: ./examples/get_message.yaml description: Needs a more full description created. post: operationId: microsoftAzureModifyMessage tags: - Assistants summary: Microsoft Azure Modifies A Message parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the thread to which this message belongs. - in: path name: message_id required: true schema: type: string description: The ID of the message to modify. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/modifyMessageRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/messageObject' x-ms-examples: Modify a message.: $ref: ./examples/modify_message.yaml description: Needs a more full description created. /threads/runs: post: operationId: microsoftAzureCreateThreadAndRun tags: - Assistants summary: Microsoft Azure Create A Thread And Run It In One Request parameters: - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/createThreadAndRunRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/runObject' x-ms-examples: Create a thread and run it.: $ref: ./examples/create_thread_and_run.yaml description: Needs a more full description created. /threads/{thread_id}/runs: get: operationId: microsoftAzureListRuns tags: - Assistants summary: Microsoft Azure Returns A List Of Runs Belonging To A Thread parameters: - name: thread_id in: path required: true schema: type: string description: The ID of the thread the run belongs to. - 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. ' 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. ' schema: type: string default: desc enum: - asc - desc x-ms-enum: name: ListRunsOrder modelAsString: true values: - value: asc description: Order results in ascending order - value: desc description: Order results in descending order - 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. ' 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. ' schema: type: string - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/listRunsResponse' x-ms-examples: List runs.: $ref: ./examples/list_runs.yaml description: Needs a more full description created. post: operationId: microsoftAzureCreateRun tags: - Assistants summary: Microsoft Azure Create A Run parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the thread to run. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/createRunRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/runObject' x-ms-examples: Create a run.: $ref: ./examples/create_run.yaml description: Needs a more full description created. /threads/{thread_id}/runs/{run_id}: get: operationId: microsoftAzureGetRun tags: - Assistants summary: Microsoft Azure Retrieves A Run parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the [thread](/docs/api-reference/threads) that was run. - in: path name: run_id required: true schema: type: string description: The ID of the run to retrieve. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/runObject' x-ms-examples: Retrieve a run.: $ref: ./examples/get_run.yaml description: Needs a more full description created. post: operationId: microsoftAzureModifyRun tags: - Assistants summary: Microsoft Azure Modifies A Run parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the [thread](/docs/api-reference/threads) that was run. - in: path name: run_id required: true schema: type: string description: The ID of the run to modify. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/modifyRunRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/runObject' x-ms-examples: Modify a run.: $ref: ./examples/modify_run.yaml description: Needs a more full description created. /threads/{thread_id}/runs/{run_id}/submit_tool_outputs: post: operationId: microsoftAzureSubmitToolOutputsToRun tags: - Assistants summary: 'Microsoft Azure When A Run Has The `status: "requires Action"` And `required Action Type` Is `submit Tool Outputs`, This Endpoint Can Be Used To Submit The Outputs From The Tool Calls Once They Re All Completed All Outputs Must Be Submitted In A Single Request' parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the [thread](/docs/api-reference/threads) to which this run belongs. - in: path name: run_id required: true schema: type: string description: The ID of the run that requires the tool output submission. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/submitToolOutputsRunRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/runObject' x-ms-examples: Submit tool outputs to a run.: $ref: ./examples/submit_tool_outputs_to_run.yaml description: Needs a more full description created. /threads/{thread_id}/runs/{run_id}/cancel: post: operationId: microsoftAzureCancelRun tags: - Assistants summary: Microsoft Azure Cancels A Run That Is `in Progress` parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the thread to which this run belongs. - in: path name: run_id required: true schema: type: string description: The ID of the run to cancel. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/runObject' x-ms-examples: Cancel a run.: $ref: ./examples/cancel_run.yaml description: Needs a more full description created. /threads/{thread_id}/runs/{run_id}/steps: get: operationId: microsoftAzureListRunSteps tags: - Assistants summary: Microsoft Azure Returns A List Of Run Steps Belonging To A Run parameters: - name: thread_id in: path required: true schema: type: string description: The ID of the thread the run and run steps belong to. - name: run_id in: path required: true schema: type: string description: The ID of the run the run steps belong to. - 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. ' 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. ' schema: type: string default: desc enum: - asc - desc x-ms-enum: name: ListRunStepsOrder modelAsString: true values: - value: asc description: Order results in ascending order - value: desc description: Order results in descending order - 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. ' 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. ' schema: type: string - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/listRunStepsResponse' x-ms-examples: List run steps.: $ref: ./examples/list_run_steps.yaml description: Needs a more full description created. /threads/{thread_id}/runs/{run_id}/steps/{step_id}: get: operationId: microsoftAzureGetRunStep tags: - Assistants summary: Microsoft Azure Retrieves A Run Step parameters: - in: path name: thread_id required: true schema: type: string description: The ID of the thread to which the run and run step belongs. - in: path name: run_id required: true schema: type: string description: The ID of the run to which the run step belongs. - in: path name: step_id required: true schema: type: string description: The ID of the run step to retrieve. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/runStepObject' x-ms-examples: Retrieve a run step.: $ref: ./examples/get_run_step.yaml description: Needs a more full description created. /assistants/{assistant_id}/files: get: operationId: microsoftAzureListAssistantFiles tags: - Assistants summary: Microsoft Azure Returns A List Of Assistant Files parameters: - name: assistant_id in: path description: The ID of the assistant the file 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. ' 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. ' schema: type: string default: desc enum: - asc - desc x-ms-enum: name: ListAssistantFilesOrder modelAsString: true values: - value: asc description: Order results in ascending order - value: desc description: Order results in descending order - 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. ' 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. ' schema: type: string - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/listAssistantFilesResponse' x-ms-examples: List assistant files.: $ref: ./examples/list_assistant_files.yaml description: Needs a more full description created. post: operationId: microsoftAzureCreateAssistantFile tags: - Assistants summary: Microsoft Azure 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 description: 'The ID of the assistant for which to create a File. ' - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/createAssistantFileRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/assistantFileObject' x-ms-examples: Create an assistant file.: $ref: ./examples/create_assistant_file.yaml description: Needs a more full description created. /assistants/{assistant_id}/files/{file_id}: get: operationId: microsoftAzureGetAssistantFile tags: - Assistants summary: Microsoft Azure 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. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/assistantFileObject' x-ms-examples: Retrieve an assistant file.: $ref: ./examples/get_assistant_file.yaml description: Needs a more full description created. delete: operationId: microsoftAzureDeleteAssistantFile tags: - Assistants summary: Microsoft Azure 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. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/deleteAssistantFileResponse' x-ms-examples: Delete an assistant file.: $ref: ./examples/delete_assistant_file.yaml description: Needs a more full description created. /threads/{thread_id}/messages/{message_id}/files: get: operationId: microsoftAzureListMessageFiles tags: - Assistants summary: Microsoft Azure 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. ' 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. ' schema: type: string default: desc enum: - asc - desc x-ms-enum: name: ListMessageFilesOrder modelAsString: true values: - value: asc description: Order results in ascending order - value: desc description: Order results in descending order - 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. ' 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. ' schema: type: string - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/listMessageFilesResponse' x-ms-examples: List message files.: $ref: ./examples/list_message_files.yaml description: Needs a more full description created. /threads/{thread_id}/messages/{message_id}/files/{file_id}: get: operationId: microsoftAzureGetMessageFile tags: - Assistants summary: Microsoft Azure 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. - in: query name: api-version required: true schema: type: string example: 2024-03-01-preview description: api version responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/messageFileObject' x-ms-examples: Retrieve a message file.: $ref: ./examples/get_message_file.yaml description: Needs a more full description created. components: schemas: runStepDetailsToolCallsCodeObject: title: Code interpreter tool call type: object description: Details of the Code Interpreter tool call the run step was involved in. properties: id: type: string description: The ID of the tool call. type: type: string description: The type of tool call. This is always going to be `code_interpreter` for this type of tool call. enum: - code_interpreter x-ms-enum: name: RunStepDetailsToolCallsCodeObjectType modelAsString: true values: - value: code_interpreter code_interpreter: type: object description: The Code Interpreter tool call definition. required: - input - outputs properties: input: type: string description: The input to the Code Interpreter tool call. outputs: type: array description: The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type. items: type: object oneOf: - $ref: '#/components/schemas/runStepDetailsToolCallsCodeOutputLogsObject' - $ref: '#/components/schemas/runStepDetailsToolCallsCodeOutputImageObject' required: - id - type - code_interpreter messageContentTextAnnotationsFileCitationObject: title: File citation type: object description: A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "retrieval" tool to search files. properties: type: description: Always `file_citation`. type: string enum: - file_citation x-ms-enum: name: FileCitationObjectType modelAsString: true values: - value: file_citation description: The file citation object type text: description: The text in the message content that needs to be replaced. type: string file_citation: type: object properties: file_id: description: The ID of the specific File the citation is from. type: string quote: description: The specific quote in the file. type: string required: - file_id - quote start_index: type: integer minimum: 0 end_index: type: integer minimum: 0 required: - type - text - file_citation - start_index - end_index threadObject: type: object title: Thread description: Represents a thread that contains [messages](/docs/api-reference/messages). properties: id: description: The identifier, which can be referenced in API endpoints. type: string object: description: The object type, which is always `thread`. type: string enum: - thread x-ms-enum: name: ThreadObjectType modelAsString: true values: - value: thread description: The type of thread object which is always `thread` created_at: description: The Unix timestamp (in seconds) for when the thread was created. type: integer 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 maximum of 512 characters long. ' type: object nullable: true required: - id - object - created_at - metadata 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 assistantToolsRetrieval: type: object title: Retrieval tool properties: type: type: string description: 'The type of tool being defined: `retrieval`' enum: - retrieval x-ms-enum: name: assistantToolsRetrievalType modelAsString: true values: - value: retrieval description: retrieval as type of tool being defined required: - type runStepDetailsToolCallsCodeOutputImageObject: title: Code interpreter image output type: object properties: type: description: Always `image`. type: string enum: - image x-ms-enum: name: RunStepDetailsToolCallsCodeOutputImageObjectType modelAsString: true values: - value: image image: type: object properties: file_id: description: The [file](/docs/api-reference/files) ID of the image. type: string required: - file_id required: - type - image 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 x-ms-enum: name: MessageFileObjectType modelAsString: true values: - value: 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 listRunStepsResponse: properties: object: type: string example: list data: type: array items: $ref: '#/components/schemas/runStepObject' first_id: type: string example: step_hLBK7PXBv5Lr2NQT7KLY0ag1 last_id: type: string example: step_QLoItBbqwyAJEzlTy4y9kOMM has_more: type: boolean example: false required: - object - data - first_id - last_id - has_more runStepObject: type: object title: Run steps description: 'Represents a step in execution of a run. ' properties: id: description: The identifier of the run step, which can be referenced in API endpoints. type: string object: description: The object type, which is always `assistant.run.step``. type: string enum: - assistant.run.step x-ms-enum: name: RunStepObjectType modelAsString: true values: - value: assistant.run.step description: The object type, which is always `assistant.run.step` created_at: description: The Unix timestamp (in seconds) for when the run step was created. type: integer assistant_id: description: The ID of the [assistant](/docs/api-reference/assistants) associated with the run step. type: string thread_id: description: The ID of the [thread](/docs/api-reference/threads) that was run. type: string run_id: description: The ID of the [run](/docs/api-reference/runs) that this run step is a part of. type: string type: description: The type of run step, which can be either `message_creation` or `tool_calls`. type: string enum: - message_creation - tool_calls x-ms-enum: name: RunStepObjectType modelAsString: true values: - value: message_creation description: The message_creation run step - value: tool_calls description: The tool_calls run step status: description: The status of the run, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. type: string enum: - in_progress - cancelled - failed - completed - expired x-ms-enum: name: RunStepObjectStatus modelAsString: true values: - value: in_progress description: The in_progress run status - value: cancelled description: The cancelled run status - value: failed description: The cancelled run status - value: completed description: The cancelled run status - value: expired description: The cancelled run status step_details: type: object description: The details of the run step. oneOf: - $ref: '#/components/schemas/runStepDetailsMessageCreationObject' - $ref: '#/components/schemas/runStepDetailsToolCallsObject' last_error: type: object description: The last error associated with this run step. Will be `null` if there are no errors. nullable: true properties: code: type: string description: One of `server_error` or `rate_limit_exceeded`. enum: - server_error - rate_limit_exceeded x-ms-enum: name: LastErrorCode modelAsString: true values: - value: server_error description: The server_error - value: rate_limit_exceeded description: The rate_limit_exceeded status message: type: string description: A human-readable description of the error. required: - code - message expired_at: description: The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired. type: integer nullable: true cancelled_at: description: The Unix timestamp (in seconds) for when the run step was cancelled. type: integer nullable: true failed_at: description: The Unix timestamp (in seconds) for when the run step failed. type: integer nullable: true completed_at: description: The Unix timestamp (in seconds) for when the run step completed. type: integer nullable: true 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 maximum of 512 characters long. ' type: object nullable: true required: - id - object - created_at - assistant_id - thread_id - run_id - type - status - step_details - last_error - expired_at - cancelled_at - failed_at - completed_at - metadata runStepDetailsMessageCreationObject: title: Message creation type: object description: Details of the message creation by the run step. properties: type: description: Always `message_creation``. type: string enum: - message_creation x-ms-enum: name: RunStepDetailsMessageCreationObjectType modelAsString: true values: - value: message_creation message_creation: type: object properties: message_id: type: string description: The ID of the message that was created by this run step. required: - message_id required: - type - message_creation 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 x-ms-enum: name: DeleteAssistantFileResponseType modelAsString: true values: - value: assistant.file.deleted required: - id - object - deleted modifyMessageRequest: type: object additionalProperties: false properties: 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 maximum of 512 characters long. ' type: object nullable: true 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 x-ms-enum: name: AssistantFileObjectType modelAsString: true values: - value: 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 modifyThreadRequest: type: object additionalProperties: false properties: 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 maximum of 512 characters long. ' type: object nullable: true messageContentTextAnnotationsFilePathObject: title: File path type: object description: A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. properties: type: description: Always `file_path`. type: string enum: - file_path x-ms-enum: name: FilePathObjectType modelAsString: true values: - value: file_path description: The file path object type text: description: The text in the message content that needs to be replaced. type: string file_path: type: object properties: file_id: description: The ID of the file that was generated. type: string required: - file_id start_index: type: integer minimum: 0 end_index: type: integer minimum: 0 required: - type - text - file_path - start_index - end_index runStepDetailsToolCallsObject: title: Tool calls type: object description: Details of the tool call. properties: type: description: Always `tool_calls`. type: string enum: - tool_calls x-ms-enum: name: RunStepDetailsToolCallsObjectType modelAsString: true values: - value: tool_calls tool_calls: type: array description: 'An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `retrieval`, or `function`. ' items: type: object oneOf: - $ref: '#/components/schemas/runStepDetailsToolCallsCodeObject' - $ref: '#/components/schemas/runStepDetailsToolCallsRetrievalObject' - $ref: '#/components/schemas/runStepDetailsToolCallsFunctionObject' required: - type - tool_calls runStepDetailsToolCallsFunctionObject: type: object title: Function tool call properties: id: type: string description: The ID of the tool call object. type: type: string description: The type of tool call. This is always going to be `function` for this type of tool call. enum: - function x-ms-enum: name: RunStepDetailsToolCallsFunctionObjectType modelAsString: true values: - value: function function: type: object description: The definition of the function that was called. properties: name: type: string description: The name of the function. arguments: type: string description: The arguments passed to the function. output: type: string description: The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet. nullable: true required: - name - arguments - output required: - id - type - function deleteThreadResponse: type: object properties: id: type: string deleted: type: boolean object: type: string enum: - thread.deleted x-ms-enum: name: DeleteThreadResponseObjectState modelAsString: true values: - value: thread.deleted description: The delete thread response object state which is `thread.deleted` required: - id - object - deleted createThreadAndRunRequest: type: object additionalProperties: false properties: assistant_id: description: The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. type: string thread: $ref: '#/components/schemas/createThreadRequest' description: If no thread is provided, an empty thread will be created. model: description: The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. type: string nullable: true instructions: description: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. type: string nullable: true tools: description: Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. nullable: true type: array maxItems: 20 items: oneOf: - $ref: '#/components/schemas/assistantToolsCode' - $ref: '#/components/schemas/assistantToolsRetrieval' - $ref: '#/components/schemas/assistantToolsFunction' 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 maximum of 512 characters long. ' type: object nullable: true required: - thread_id - assistant_id runStepDetailsToolCallsCodeOutputLogsObject: title: Code interpreter log output type: object description: Text output from the Code Interpreter tool call as part of a run step. properties: type: description: Always `logs`. type: string enum: - logs x-ms-enum: name: RunStepDetailsToolCallsCodeOutputLogsObjectType modelAsString: true values: - value: code_interpreter logs: type: string description: The text output from the Code Interpreter tool call. required: - type - logs modifyRunRequest: type: object additionalProperties: false properties: 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 maximum of 512 characters long. ' type: object nullable: true 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 createMessageRequest: type: object additionalProperties: false required: - role - content properties: role: type: string enum: - user x-ms-enum: name: CreateMessageRequestRole modelAsString: true values: - value: user description: The create message role as `user` description: The role of the entity that is creating the message. Currently only `user` is supported. content: type: string minLength: 1 maxLength: 32768 description: The content of the message. file_ids: description: A list of [File](/docs/api-reference/files) IDs that the message should use. There can be a maximum of 10 files attached to a message. Useful for tools like `retrieval` and `code_interpreter` that can access and use files. default: [] type: array minItems: 1 maxItems: 10 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 maximum of 512 characters long. ' type: object nullable: true listMessagesResponse: properties: object: type: string example: list data: type: array items: $ref: '#/components/schemas/messageObject' first_id: type: string example: msg_hLBK7PXBv5Lr2NQT7KLY0ag1 last_id: type: string example: msg_QLoItBbqwyAJEzlTy4y9kOMM has_more: type: boolean example: false required: - object - data - first_id - last_id - has_more runToolCallObject: type: object description: Tool call objects properties: id: type: string description: The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint. type: type: string description: The type of tool call the output is required for. For now, this is always `function`. enum: - function x-ms-enum: name: RunToolCallObjectType modelAsString: true values: - value: function description: The type of tool call the output is required for which is always `function` for now - value: rate_limit_exceeded description: The server failed to respond to request due to rate limit exceeded function: type: object description: The function definition. properties: name: type: string description: The name of the function. arguments: type: string description: The arguments that the model expects you to pass to the function. required: - name - arguments required: - id - type - function submitToolOutputsRunRequest: type: object additionalProperties: false properties: tool_outputs: description: A list of tools for which the outputs are being submitted. type: array items: type: object properties: tool_call_id: type: string description: The ID of the tool call in the `required_action` object within the run object the output is being submitted for. output: type: string description: The output of the tool call to be submitted to continue the run. required: - tool_outputs createRunRequest: type: object additionalProperties: false properties: assistant_id: description: The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. type: string model: description: The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. type: string nullable: true instructions: description: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. type: string nullable: true tools: description: Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. nullable: true type: array maxItems: 20 items: oneOf: - $ref: '#/components/schemas/assistantToolsCode' - $ref: '#/components/schemas/assistantToolsRetrieval' - $ref: '#/components/schemas/assistantToolsFunction' 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 maximum of 512 characters long. ' type: object nullable: true required: - thread_id - assistant_id createThreadRequest: type: object additionalProperties: false properties: messages: description: A list of [messages](/docs/api-reference/messages) to start the thread with. type: array items: $ref: '#/components/schemas/createMessageRequest' 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 maximum of 512 characters long. ' type: object nullable: true 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 x-ms-enum: name: AssistantObjectType modelAsString: true values: - value: assistant description: The object type, which is always 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. ' type: string maxLength: 256 nullable: true description: description: 'The description of the assistant. The maximum length is 512 characters. ' 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. ' type: string instructions: description: 'The system instructions that the assistant uses. The maximum length is 32768 characters. ' 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`. ' default: [] type: array maxItems: 128 items: oneOf: - $ref: '#/components/schemas/assistantToolsCode' - $ref: '#/components/schemas/assistantToolsRetrieval' - $ref: '#/components/schemas/assistantToolsFunction' 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. ' 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 maximum of 512 characters long. ' type: object nullable: true required: - id - object - created_at - name - description - model - instructions - tools - file_ids - metadata assistantToolsFunction: type: object title: Function tool properties: type: type: string description: 'The type of tool being defined: `function`' enum: - function x-ms-enum: name: assistantToolsFunction modelAsString: true values: - value: retrieval description: retrieval as type of tool being defined function: type: object description: The function definition. properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. parameters: $ref: '#/components/schemas/chatCompletionFunctionParameters' required: - name - parameters - description required: - type - function runObject: type: object title: A run on a thread description: Represents an execution run on a [thread](/docs/api-reference/threads). properties: id: description: The identifier, which can be referenced in API endpoints. type: string object: description: The object type, which is always `thread.run`. type: string enum: - thread.run x-ms-enum: name: runObjectType modelAsString: true values: - value: thread.run description: The run object type which is always thread.run created_at: description: The Unix timestamp (in seconds) for when the run was created. type: integer thread_id: description: The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run. type: string assistant_id: description: The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run. type: string status: description: The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`. type: string enum: - queued - in_progress - requires_action - cancelling - cancelled - failed - completed - expired x-ms-enum: name: RunObjectStatus modelAsString: true values: - value: queued description: The queued state - value: in_progress description: The in_progress state - value: requires_action description: The required_action state - value: cancelling description: The cancelling state - value: cancelled description: The cancelled state - value: failed description: The failed state - value: completed description: The completed state - value: expired description: The expired state required_action: type: object description: Details on the action required to continue the run. Will be `null` if no action is required. nullable: true properties: type: description: For now, this is always `submit_tool_outputs`. type: string enum: - submit_tool_outputs submit_tool_outputs: type: object description: Details on the tool outputs needed for this run to continue. properties: tool_calls: type: array description: A list of the relevant tool calls. items: $ref: '#/components/schemas/runToolCallObject' required: - tool_calls required: - type - submit_tool_outputs last_error: type: object description: The last error associated with this run. Will be `null` if there are no errors. nullable: true properties: code: type: string description: One of `server_error` or `rate_limit_exceeded`. enum: - server_error - rate_limit_exceeded x-ms-enum: name: LastErrorCode modelAsString: true values: - value: server_error description: The server failed to respond to request due to server error - value: rate_limit_exceeded description: The server failed to respond to request due to rate limit exceeded message: type: string description: A human-readable description of the error. required: - code - message expires_at: description: The Unix timestamp (in seconds) for when the run will expire. type: integer started_at: description: The Unix timestamp (in seconds) for when the run was started. type: integer nullable: true cancelled_at: description: The Unix timestamp (in seconds) for when the run was cancelled. type: integer nullable: true failed_at: description: The Unix timestamp (in seconds) for when the run failed. type: integer nullable: true completed_at: description: The Unix timestamp (in seconds) for when the run was completed. type: integer nullable: true model: description: The model that the [assistant](/docs/api-reference/assistants) used for this run. type: string instructions: description: The instructions that the [assistant](/docs/api-reference/assistants) used for this run. type: string tools: description: The list of tools that the [assistant](/docs/api-reference/assistants) used for this run. default: [] type: array maxItems: 20 items: oneOf: - $ref: '#/components/schemas/assistantToolsCode' - $ref: '#/components/schemas/assistantToolsRetrieval' - $ref: '#/components/schemas/assistantToolsFunction' file_ids: description: The list of [File](/docs/api-reference/files) IDs the [assistant](/docs/api-reference/assistants) used for this run. default: [] 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 maximum of 512 characters long. ' type: object nullable: true required: - id - object - created_at - thread_id - assistant_id - status - required_action - last_error - expires_at - started_at - cancelled_at - failed_at - completed_at - model - instructions - tools - file_ids - metadata runStepDetailsToolCallsRetrievalObject: title: Retrieval tool call type: object properties: id: type: string description: The ID of the tool call object. type: type: string description: The type of tool call. This is always going to be `retrieval` for this type of tool call. enum: - retrieval x-ms-enum: name: RunStepDetailsToolCallsRetrievalObjectType modelAsString: true values: - value: retrieval retrieval: type: object description: For now, this is always going to be an empty object. required: - id - type - retrieval messageContentImageFileObject: title: Image file type: object description: References an image [File](/docs/api-reference/files) in the content of a message. properties: type: description: Always `image_file`. type: string enum: - image_file x-ms-enum: name: MessageContentImageFileObjectType modelAsString: true values: - value: image_file description: The message content image file type image_file: type: object properties: file_id: description: The [File](/docs/api-reference/files) ID of the image in the message content. type: string required: - file_id required: - type - image_file messageContentTextObject: title: Text type: object description: The text content that is part of a message. properties: type: description: Always `text`. type: string enum: - text x-ms-enum: name: messageContentTextObjectType modelAsString: true values: - value: text description: The message content text Object type text: type: object properties: value: description: The data that makes up the text. type: string annotations: type: array items: oneOf: - $ref: '#/components/schemas/messageContentTextAnnotationsFileCitationObject' - $ref: '#/components/schemas/messageContentTextAnnotationsFilePathObject' required: - value - annotations required: - type - text messageObject: type: object title: The message object description: Represents a message within a [thread](/docs/api-reference/threads). properties: id: description: The identifier, which can be referenced in API endpoints. type: string object: description: The object type, which is always `thread.message`. type: string enum: - thread.message x-ms-enum: name: MessageObjectType modelAsString: true values: - value: thread.message description: The message object type which is `thread.message` created_at: description: The Unix timestamp (in seconds) for when the message was created. type: integer thread_id: description: The [thread](/docs/api-reference/threads) ID that this message belongs to. type: string role: description: The entity that produced the message. One of `user` or `assistant`. type: string enum: - user - assistant x-ms-enum: name: MessageObjectRole modelAsString: true values: - value: user description: Message object role as `user` - value: assistant description: Message object role as `assistant` content: description: The content of the message in array of text and/or images. type: array items: oneOf: - $ref: '#/components/schemas/messageContentImageFileObject' - $ref: '#/components/schemas/messageContentTextObject' assistant_id: description: If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message. type: string nullable: true run_id: description: If applicable, the ID of the [run](/docs/api-reference/runs) associated with the authoring of this message. type: string nullable: true file_ids: description: A list of [file](/docs/api-reference/files) IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files. A maximum of 10 files can be attached to a message. default: [] maxItems: 10 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 maximum of 512 characters long. ' type: object nullable: true required: - id - object - created_at - thread_id - role - content - assistant_id - run_id - file_ids - metadata deleteAssistantResponse: type: object properties: id: type: string deleted: type: boolean object: type: string enum: - assistant.deleted x-ms-enum: name: DeleteAssistantResponseState modelAsString: true values: - value: assistant.deleted description: The assistant is deleted required: - id - object - deleted chatCompletionFunctionParameters: type: object description: The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/gpt/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. additionalProperties: true listRunsResponse: type: object properties: object: type: string example: list data: type: array items: $ref: '#/components/schemas/runObject' first_id: type: string example: run_hLBK7PXBv5Lr2NQT7KLY0ag1 last_id: type: string example: run_QLoItBbqwyAJEzlTy4y9kOMM has_more: type: boolean example: false required: - object - data - first_id - last_id - has_more assistantToolsCode: type: object title: Code interpreter tool properties: type: type: string description: 'The type of tool being defined: `code_interpreter`' enum: - code_interpreter x-ms-enum: name: assistantToolsCodeType modelAsString: true values: - value: code_interpreter description: code_interpreter as type of tool being defined required: - type createAssistantFileRequest: type: object additionalProperties: false properties: file_id: description: A [File](/docs/api-reference/files) ID (with `purpose="assistants"`) that the assistant should use. Useful for tools like `retrieval` and `code_interpreter` that can access files. type: string required: - file_id definitions: ToolDefinition: type: object description: An abstract representation of an input tool definition that an assistant can use. properties: type: type: string description: The object type. discriminator: type required: - type Assistant: type: object description: Represents an assistant that can call the model and use tools. properties: id: type: string description: The identifier, which can be referenced in API endpoints. object: type: string description: The object type, which is always assistant. enum: - assistant x-ms-enum: modelAsString: false created_at: type: integer format: unixtime description: The Unix timestamp, in seconds, representing when this object was created. x-ms-client-name: createdAt name: type: string description: The name of the assistant. x-nullable: true description: type: string description: The description of the assistant. x-nullable: true model: type: string description: The ID of the model to use. instructions: type: string description: The system instructions for the assistant to use. x-nullable: true tools: type: array description: The collection of tools enabled for the assistant. default: [] items: $ref: '#/definitions/ToolDefinition' x-ms-identifiers: [] file_ids: type: array description: A list of attached file IDs, ordered by creation date in ascending order. default: [] items: type: string x-ms-client-name: fileIds metadata: type: object description: A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. x-nullable: true additionalProperties: type: string required: - id - object - created_at - name - description - model - instructions - tools - file_ids - metadata AssistantCreationOptions: type: object description: The request details to use when creating a new assistant. properties: model: type: string description: The ID of the model to use. name: type: string description: The name of the new assistant. x-nullable: true description: type: string description: The description of the new assistant. x-nullable: true instructions: type: string description: The system instructions for the new assistant to use. x-nullable: true tools: type: array description: The collection of tools to enable for the new assistant. default: [] items: $ref: '#/definitions/ToolDefinition' x-ms-identifiers: [] file_ids: type: array description: A list of previously uploaded file IDs to attach to the assistant. default: [] items: type: string x-ms-client-name: fileIds metadata: type: object description: A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. x-nullable: true additionalProperties: type: string required: - model AssistantDeletionStatus: type: object description: The status of an assistant deletion operation. properties: id: type: string description: The ID of the resource specified for deletion. deleted: type: boolean description: A value indicating whether deletion was successful. object: type: string description: The object type, which is always 'assistant.deleted'. enum: - assistant.deleted x-ms-enum: modelAsString: false required: - id - deleted - object AssistantFileDeletionStatus: type: object description: The status of an assistant file deletion operation. properties: id: type: string description: The ID of the resource specified for deletion. deleted: type: boolean description: A value indicating whether deletion was successful. object: type: string description: The object type, which is always 'assistant.file.deleted'. enum: - assistant.file.deleted x-ms-enum: modelAsString: false required: - id - deleted - object AssistantFile: type: object description: Information about a file attached to an assistant, as used by tools that can read files. properties: id: type: string description: The identifier, which can be referenced in API endpoints. object: type: string description: The object type, which is always 'assistant.file'. enum: - assistant.file x-ms-enum: modelAsString: false created_at: type: integer format: unixtime description: The Unix timestamp, in seconds, representing when this object was created. x-ms-client-name: createdAt assistant_id: type: string description: The assistant ID that the file is attached to. x-ms-client-name: assistantId required: - id - object - created_at - assistant_id AssistantModificationOptions: type: object description: The request details to use when modifying an existing assistant. properties: model: type: string description: The ID of the model to use. name: type: string description: The modified name for the assistant to use. x-nullable: true description: type: string description: The modified description for the assistant to use. x-nullable: true instructions: type: string description: The modified system instructions for the new assistant to use. x-nullable: true tools: type: array description: The modified collection of tools to enable for the assistant. default: [] items: $ref: '#/definitions/ToolDefinition' x-ms-identifiers: [] file_ids: type: array description: The modified list of previously uploaded fileIDs to attach to the assistant. default: [] items: type: string x-ms-client-name: fileIds metadata: type: object description: A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. x-nullable: true additionalProperties: type: string x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'