swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Threads API schemes: - https tags: - name: Threads paths: /chat/threads/{chatThreadId}/readReceipts: get: tags: - Threads summary: Microsoft Azure Gets Chat Message Read Receipts For A Thread operationId: microsoftAzureChatthreadListchatreadreceipts produces: - application/json parameters: - in: path name: chatThreadId description: Thread id to get the chat message read receipts for. required: true type: string - in: query name: maxPageSize description: The maximum number of chat message read receipts to be returned per page. type: integer format: int32 - in: query name: skip description: Skips chat message read receipts up to a specified position in response. type: integer format: int32 - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Request successful. The action returns the requested `ChatMessageReadReceipt` resources. schema: $ref: '#/definitions/ChatMessageReadReceiptsCollection' '401': description: Unauthorized. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '403': description: Forbidden. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '429': description: Too many requests. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '503': description: Service unavailable. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true x-ms-examples: Get thread read receipts with pagination (max page size): $ref: ./examples/Conversations_ListChatReadReceiptsWithPageSize.json x-ms-pageable: nextLinkName: nextLink itemName: value description: Needs a more full description created. post: tags: - Threads summary: Microsoft Azure Sends A Read Receipt Event To A Thread, On Behalf Of A User operationId: microsoftAzureChatthreadSendchatreadreceipt consumes: - application/json produces: - application/json parameters: - in: path name: chatThreadId description: Thread id to send the read receipt event to. required: true type: string - $ref: '#/parameters/ApiVersionParameter' - in: body name: sendReadReceiptRequest description: Read receipt details. required: true schema: $ref: '#/definitions/SendReadReceiptRequest' responses: '200': description: Request successful. '401': description: Unauthorized. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '403': description: Forbidden. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '429': description: Too many requests. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '503': description: Service unavailable. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true x-ms-examples: Send read receipt: $ref: ./examples/Conversations_SendChatReadReceipt.json description: Needs a more full description created. /chat/threads: post: tags: - Threads summary: Microsoft Azure Creates A Chat Thread operationId: microsoftAzureChatCreatechatthread consumes: - application/json produces: - application/json parameters: - in: header name: repeatability-request-id description: If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. type: string - $ref: '#/parameters/ApiVersionParameter' - in: body name: createChatThreadRequest description: Request payload for creating a chat thread. required: true schema: $ref: '#/definitions/CreateChatThreadRequest' responses: '201': description: Thread created, the `Location` header would contain the URL for the newly created thread. schema: $ref: '#/definitions/CreateChatThreadResult' '401': description: Unauthorized. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '403': description: Forbidden. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '429': description: Too many requests. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '503': description: Service unavailable. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true x-ms-examples: Create chat thread: $ref: ./examples/Threads_CreateChatThread.json Create chat thread with repeatability request id header: $ref: ./examples/Threads_CreateChatThreadWithIdempotencyToken.json description: Needs a more full description created. get: tags: - Threads summary: Microsoft Azure Gets The List Of Chat Threads Of A User operationId: microsoftAzureChatListchatthreads produces: - application/json parameters: - in: query name: maxPageSize description: The maximum number of chat threads returned per page. type: integer format: int32 - in: query name: startTime description: 'The earliest point in time to get chat threads up to. The timestamp should be in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.' type: string format: date-time - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Request successful. The action returns a `GetThreadsResponse` resource. schema: $ref: '#/definitions/ChatThreadsItemCollection' '401': description: Unauthorized. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '403': description: Forbidden. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '429': description: Too many requests. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '503': description: Service unavailable. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true x-ms-examples: Get threads with pagination (Max Page Size): $ref: ./examples/Threads_ListChatThreadsWithPageSize.json x-ms-pageable: nextLinkName: nextLink itemName: value description: Needs a more full description created. /chat/threads/{chatThreadId}: patch: tags: - Threads summary: Microsoft Azure Updates A Thread S Properties operationId: microsoftAzureChatthreadUpdatechatthreadproperties consumes: - application/merge-patch+json produces: - application/json parameters: - in: path name: chatThreadId description: The id of the thread to update. required: true type: string - $ref: '#/parameters/ApiVersionParameter' - in: body name: updateChatThreadRequest description: Request payload for updating a chat thread. required: true schema: $ref: '#/definitions/UpdateChatThreadRequest' responses: '204': description: Thread was successfully updated. '401': description: Unauthorized. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '403': description: Forbidden. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '429': description: Too many requests. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '503': description: Service unavailable. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true x-ms-examples: Update chat thread topic: $ref: ./examples/Threads_UpdateChatThreadTopic.json description: Needs a more full description created. get: tags: - Threads summary: Microsoft Azure Gets A Chat Thread S Properties operationId: microsoftAzureChatthreadGetchatthreadproperties produces: - application/json parameters: - in: path name: chatThreadId description: Id of the thread. required: true type: string - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: Request successful. The action returns a chat thread. schema: $ref: '#/definitions/ChatThreadProperties' '401': description: Unauthorized. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '403': description: Forbidden. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '429': description: Too many requests. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '503': description: Service unavailable. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true x-ms-examples: Get chat thread: $ref: ./examples/Threads_GetChatThread.json description: Needs a more full description created. delete: tags: - Threads summary: Microsoft Azure Deletes A Thread operationId: microsoftAzureChatDeletechatthread produces: - application/json parameters: - in: path name: chatThreadId description: Id of the thread to be deleted. required: true type: string - $ref: '#/parameters/ApiVersionParameter' responses: '204': description: Request successful. '401': description: Unauthorized. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '403': description: Forbidden. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '429': description: Too many requests. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true '503': description: Service unavailable. schema: $ref: '#/definitions/CommunicationErrorResponse' x-ms-error-response: true x-ms-examples: Delete chat thread: $ref: ./examples/Threads_DeleteChatThread.json description: Needs a more full description created. /threads: post: operationId: microsoftAzureCreatethread description: Creates a new thread. Threads contain messages and can be run by assistants. parameters: - name: body in: body required: true schema: $ref: '#/definitions/AssistantThreadCreationOptions' responses: '200': description: Information about the newly created thread. schema: $ref: '#/definitions/AssistantThread' summary: Microsoft Azure Post Threads tags: - Threads /threads/{threadId}: get: operationId: microsoftAzureGetthread description: Gets information about an existing thread. parameters: - name: threadId in: path description: The ID of the thread to retrieve information about. required: true type: string responses: '200': description: Information about the requested thread. schema: $ref: '#/definitions/AssistantThread' summary: Microsoft Azure Get Threads Threadid tags: - Threads post: operationId: microsoftAzureModifythread description: Modifies an existing thread. parameters: - name: threadId in: path description: The ID of the thread to modify. required: true type: string - name: body in: body required: true schema: type: object properties: 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 responses: '200': description: Information about the modified thread. schema: $ref: '#/definitions/AssistantThread' summary: Microsoft Azure Post Threads Threadid tags: - Threads delete: operationId: microsoftAzureDeletethread description: Deletes an existing thread. parameters: - name: threadId in: path description: The ID of the thread to delete. required: true type: string responses: '200': description: Status information about the requested thread deletion operation. schema: $ref: '#/definitions/ThreadDeletionStatus' summary: Microsoft Azure Delete Threads Threadid tags: - Threads /threads/{threadId}/messages: get: operationId: microsoftAzureListmessages description: Gets a list of messages that exist on a thread. parameters: - name: threadId in: path description: The ID of the thread to list messages from. 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 messages. 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/ThreadMessage' 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 Threads Threadid Messages tags: - Threads post: operationId: microsoftAzureCreatemessage description: Creates a new message on a specified thread. parameters: - name: threadId in: path description: The ID of the thread to create the new message on. required: true type: string - name: body in: body required: true schema: type: object properties: role: $ref: '#/definitions/MessageRole' description: The role to associate with the new message. content: type: string description: The textual content for the new message. file_ids: type: array description: A list of up to 10 file IDs to associate with the message, as used by tools like 'code_interpreter' or 'retrieval' that can read files. 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: - role - content responses: '200': description: A representation of the new message. schema: $ref: '#/definitions/ThreadMessage' summary: Microsoft Azure Post Threads Threadid Messages tags: - Threads /threads/{threadId}/messages/{messageId}: get: operationId: microsoftAzureGetmessage description: Gets an existing message from an existing thread. parameters: - name: threadId in: path description: The ID of the thread to retrieve the specified message from. required: true type: string - name: messageId in: path description: The ID of the message to retrieve from the specified thread. required: true type: string responses: '200': description: A representation of the requested message. schema: $ref: '#/definitions/ThreadMessage' summary: Microsoft Azure Get Threads Threadid Messages Messageid tags: - Threads post: operationId: microsoftAzureModifymessage description: Modifies an existing message on an existing thread. parameters: - name: threadId in: path description: The ID of the thread containing the specified message to modify. required: true type: string - name: messageId in: path description: The ID of the message to modify on the specified thread. required: true type: string - name: body in: body required: true schema: type: object properties: 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 responses: '200': description: A representation of the modified message. schema: $ref: '#/definitions/ThreadMessage' summary: Microsoft Azure Post Threads Threadid Messages Messageid tags: - Threads /threads/{threadId}/messages/{messageId}/files: get: operationId: microsoftAzureListmessagefiles description: Gets a list of previously uploaded files associated with a message from a thread. parameters: - name: threadId in: path description: The ID of the thread containing the message to list files from. required: true type: string - name: messageId in: path description: The ID of the message to list files from. 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 associated with the specified message. 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/MessageFile' 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 Threads Threadid Messages Messageid Files tags: - Threads /threads/{threadId}/messages/{messageId}/files/{fileId}: get: operationId: microsoftAzureGetmessagefile description: Gets information about a file attachment to a message within a thread. parameters: - name: threadId in: path description: The ID of the thread containing the message to get information from. required: true type: string - name: messageId in: path description: The ID of the message to get information from. required: true type: string - name: fileId in: path description: The ID of the file to get information about. required: true type: string responses: '200': description: The requested file information. schema: $ref: '#/definitions/MessageFile' summary: Microsoft Azure Get Threads Threadid Messages Messageid Files Fileid tags: - Threads /threads/{threadId}/runs: get: operationId: microsoftAzureListruns description: Gets a list of runs for a specified thread. parameters: - name: threadId in: path description: The ID of the thread to list runs from. 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 thread runs. 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/ThreadRun' 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 Threads Threadid Runs tags: - Threads post: operationId: microsoftAzureCreaterun description: Creates a new run for an assistant thread. parameters: - name: threadId in: path description: The ID of the thread to run. required: true type: string - name: body in: body required: true schema: type: object properties: assistant_id: type: string description: The ID of the assistant that should run the thread. x-ms-client-name: assistantId model: type: string description: The overridden model name that the assistant should use to run the thread. instructions: type: string description: The overridden system instructions that the assistant should use to run the thread. tools: type: array description: The overridden list of enabled tools that the assistant should use to run the thread. items: $ref: '#/definitions/ToolDefinition' x-ms-identifiers: [] 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: - assistant_id responses: '200': description: Information about the new thread run. schema: $ref: '#/definitions/ThreadRun' summary: Microsoft Azure Post Threads Threadid Runs tags: - Threads /threads/{threadId}/runs/{runId}: get: operationId: microsoftAzureGetrun description: Gets an existing run from an existing thread. parameters: - name: threadId in: path description: The ID of the thread to retrieve run information from. required: true type: string - name: runId in: path description: The ID of the thread to retrieve information about. required: true type: string responses: '200': description: The requested information about the specified thread run. schema: $ref: '#/definitions/ThreadRun' summary: Microsoft Azure Get Threads Threadid Runs Runid tags: - Threads post: operationId: microsoftAzureModifyrun description: Modifies an existing thread run. parameters: - name: threadId in: path description: The ID of the thread associated with the specified run. required: true type: string - name: runId in: path description: The ID of the run to modify. required: true type: string - name: body in: body required: true schema: type: object properties: 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 responses: '200': description: Information about the modified run. schema: $ref: '#/definitions/ThreadRun' summary: Microsoft Azure Post Threads Threadid Runs Runid tags: - Threads /threads/{threadId}/runs/{runId}/cancel: post: operationId: microsoftAzureCancelrun description: Cancels a run of an in progress thread. parameters: - name: threadId in: path description: The ID of the thread being run. required: true type: string - name: runId in: path description: The ID of the run to cancel. required: true type: string responses: '200': description: Updated information about the cancelled run. schema: $ref: '#/definitions/ThreadRun' summary: Microsoft Azure Post Threads Threadid Runs Runid Cancel tags: - Threads /threads/{threadId}/runs/{runId}/steps: get: operationId: microsoftAzureListrunsteps description: Gets a list of run steps from a thread run. parameters: - name: threadId in: path description: The ID of the thread that was run. required: true type: string - name: runId in: path description: The ID of the run to list steps from. 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 run steps. 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/RunStep' 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 Threads Threadid Runs Runid Steps tags: - Threads /threads/{threadId}/runs/{runId}/steps/{stepId}: get: operationId: microsoftAzureGetrunstep description: Gets a single run step from a thread run. parameters: - name: threadId in: path description: The ID of the thread that was run. required: true type: string - name: runId in: path description: The ID of the specific run to retrieve the step from. required: true type: string - name: stepId in: path description: The ID of the step to retrieve information about. required: true type: string responses: '200': description: Information about the requested run step. schema: $ref: '#/definitions/RunStep' summary: Microsoft Azure Get Threads Threadid Runs Runid Steps Stepid tags: - Threads /threads/{threadId}/runs/{runId}/submit_tool_outputs: post: operationId: microsoftAzureSubmittooloutputstorun description: Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. parameters: - name: threadId in: path description: The ID of the thread that was run. required: true type: string - name: runId in: path description: The ID of the run that requires tool outputs. required: true type: string - name: body in: body required: true schema: type: object properties: tool_outputs: type: array description: The list of tool outputs requested by tool calls from the specified run. items: $ref: '#/definitions/ToolOutput' x-ms-client-name: toolOutputs x-ms-identifiers: [] required: - tool_outputs responses: '200': description: Updated information about the run. schema: $ref: '#/definitions/ThreadRun' summary: Microsoft Azure Post Threads Threadid Runs Runid Submit Tool Outputs tags: - Threads /threads/runs: post: operationId: microsoftAzureCreatethreadandrun description: Creates a new assistant thread and immediately starts a run using that new thread. parameters: - name: body in: body required: true schema: $ref: '#/definitions/CreateAndRunThreadOptions' responses: '200': description: Information about the newly created thread. schema: $ref: '#/definitions/ThreadRun' summary: Microsoft Azure Post Threads Runs tags: - Threads definitions: RunError: type: object description: The details of an error as encountered by an assistant thread run. properties: code: type: string description: The status for the error. message: type: string description: The human-readable text associated with the error. required: - code - message CommunicationErrorResponse: $ref: ../../../Common/stable/2023-11-15/common.json#/definitions/CommunicationErrorResponse RunStep: type: object description: Detailed information about a single step of an assistant thread run. properties: id: type: string description: The identifier, which can be referenced in API endpoints. object: type: string description: The object type, which is always 'thread.run.step'. enum: - thread.run.step x-ms-enum: modelAsString: false type: $ref: '#/definitions/RunStepType' description: The type of run step, which can be either message_creation or tool_calls. assistant_id: type: string description: The ID of the assistant associated with the run step. x-ms-client-name: assistantId thread_id: type: string description: The ID of the thread that was run. x-ms-client-name: threadId run_id: type: string description: The ID of the run that this run step is a part of. x-ms-client-name: runId status: $ref: '#/definitions/RunStepStatus' description: The status of this run step. step_details: $ref: '#/definitions/RunStepDetails' description: The details for this run step. x-ms-client-name: stepDetails last_error: type: object description: If applicable, information about the last error encountered by this run step. x-nullable: true allOf: - $ref: '#/definitions/RunStepError' x-ms-client-name: lastError created_at: type: integer format: unixtime description: The Unix timestamp, in seconds, representing when this object was created. x-ms-client-name: createdAt expired_at: type: string format: date-time description: The Unix timestamp, in seconds, representing when this item expired. x-nullable: true x-ms-client-name: expiredAt completed_at: type: string format: date-time description: The Unix timestamp, in seconds, representing when this completed. x-nullable: true x-ms-client-name: completedAt cancelled_at: type: string format: date-time description: The Unix timestamp, in seconds, representing when this was cancelled. x-nullable: true x-ms-client-name: cancelledAt failed_at: type: string format: date-time description: The Unix timestamp, in seconds, representing when this failed. x-nullable: true x-ms-client-name: failedAt 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 - type - assistant_id - thread_id - run_id - status - step_details - last_error - created_at - expired_at - completed_at - cancelled_at - failed_at - metadata 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 MessageRole: type: string description: The possible values for roles attributed to messages in a thread. enum: - user - assistant x-ms-enum: name: MessageRole modelAsString: true values: - name: user value: user description: The role representing the end-user. - name: assistant value: assistant description: The role representing the assistant. ChatThreadProperties: description: Chat thread. required: - createdByCommunicationIdentifier - createdOn - id - topic type: object properties: id: description: Chat thread id. type: string example: 19:uni01_uy5ucb66ugp3lrhe7pxso6xx4hsmm3dl6eyjfefv2n6x3rrurpea@thread.v2 topic: description: Chat thread topic. type: string example: Lunch Chat thread createdOn: format: date-time description: 'The timestamp when the chat thread was created. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.' type: string example: '2020-10-30T10:50:50Z' createdByCommunicationIdentifier: $ref: '#/definitions/CommunicationIdentifierModel' deletedOn: format: date-time description: 'The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.' type: string example: '2020-10-30T10:50:50Z' metadata: description: Contextual metadata for the thread. The metadata consists of name/value pairs. The total size of all metadata pairs can be up to 1KB in size. type: object additionalProperties: type: string retentionPolicy: $ref: '#/definitions/ChatRetentionPolicy' ChatThreadItem: description: Summary information of a chat thread. required: - id - topic type: object properties: id: description: Chat thread id. type: string example: 19:uni01_uy5ucb66ugp3lrhe7pxso6xx4hsmm3dl6eyjfefv2n6x3rrurpea@thread.v2 topic: description: Chat thread topic. type: string example: Lunch Chat thread deletedOn: format: date-time description: 'The timestamp when the chat thread was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.' type: string example: '2020-10-30T10:50:50Z' lastMessageReceivedOn: format: date-time description: 'The timestamp when the last message arrived at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.' type: string readOnly: true example: '2020-10-30T10:50:50Z' ChatParticipant: description: A participant of the chat thread. required: - communicationIdentifier type: object properties: communicationIdentifier: $ref: '#/definitions/CommunicationIdentifierModel' displayName: description: Display name for the chat participant. type: string example: Bob shareHistoryTime: format: date-time description: 'Time from which the chat history is shared with the participant. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.' type: string example: '2020-10-30T10:50:50Z' metadata: description: Contextual metadata for the chat participant. The metadata consists of name/value pairs. The total size of all metadata pairs can be up to 1KB in size. type: object additionalProperties: type: string RequiredAction: type: object description: An abstract representation of a required action for an assistant thread run to continue. properties: type: type: string description: The object type. discriminator: type required: - type AssistantThread: type: object description: Information about a single thread associated with an assistant. properties: id: type: string description: The identifier, which can be referenced in API endpoints. object: type: string description: The object type, which is always 'thread'. enum: - thread 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 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 - metadata ThreadDeletionStatus: type: object description: The status of a thread 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 'thread.deleted'. enum: - thread.deleted x-ms-enum: modelAsString: false required: - id - deleted - object UpdateChatThreadRequest: description: Request payload for updating a chat thread. type: object properties: topic: description: Chat thread topic. type: string example: Lunch Thread metadata: description: Contextual metadata for the thread. The metadata consists of name/value pairs. The total size of all metadata pairs can be up to 1KB in size. type: object additionalProperties: type: string retentionPolicy: $ref: '#/definitions/ChatRetentionPolicy' RunStatus: type: string description: Possible values for the status of an assistant thread run. enum: - queued - in_progress - requires_action - cancelling - cancelled - failed - completed - expired x-ms-enum: name: RunStatus modelAsString: true values: - name: queued value: queued description: Represents a run that is queued to start. - name: inProgress value: in_progress description: Represents a run that is in progress. - name: requiresAction value: requires_action description: Represents a run that needs another operation, such as tool output submission, to continue. - name: cancelling value: cancelling description: Represents a run that is in the process of cancellation. - name: cancelled value: cancelled description: Represents a run that has been cancelled. - name: failed value: failed description: Represents a run that failed. - name: completed value: completed description: Represents a run that successfully completed. - name: expired value: expired description: Represents a run that expired before it could otherwise finish. CreateChatThreadResult: description: Result of the create chat thread operation. type: object properties: chatThread: $ref: '#/definitions/ChatThreadProperties' invalidParticipants: description: The participants that failed to be added to the chat thread. type: array items: $ref: '#/definitions/CommunicationError' readOnly: true CommunicationError: $ref: ../../../Common/stable/2023-11-15/common.json#/definitions/CommunicationError RunStepErrorCode: type: string description: Possible error code values attributable to a failed run step. enum: - server_error - rate_limit_exceeded x-ms-enum: name: RunStepErrorCode modelAsString: true values: - name: serverError value: server_error description: Represents a server error. - name: rateLimitExceeded value: rate_limit_exceeded description: Represents an error indicating configured rate limits were exceeded. ChatThreadsItemCollection: description: Collection of chat threads. required: - value type: object properties: value: description: Collection of chat threads. type: array items: $ref: '#/definitions/ChatThreadItem' nextLink: description: If there are more chat threads that can be retrieved, the next link will be populated. type: string readOnly: true RunStepStatus: type: string description: Possible values for the status of a run step. enum: - in_progress - cancelled - failed - completed - expired x-ms-enum: name: RunStepStatus modelAsString: true values: - name: inProgress value: in_progress description: Represents a run step still in progress. - name: cancelled value: cancelled description: Represents a run step that was cancelled. - name: failed value: failed description: Represents a run step that failed. - name: completed value: completed description: Represents a run step that successfully completed. - name: expired value: expired description: Represents a run step that expired before otherwise finishing. RunStepError: type: object description: The error information associated with a failed run step. properties: code: $ref: '#/definitions/RunStepErrorCode' description: The error code for this error. message: type: string description: The human-readable text associated with this error. required: - code - message AssistantThreadCreationOptions: type: object description: The details used to create a new assistant thread. properties: messages: type: array description: The messages to associate with the new thread. items: $ref: '#/definitions/ThreadMessage' 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 CreateAndRunThreadOptions: type: object description: The details used when creating and immediately running a new assistant thread. properties: assistant_id: type: string description: The ID of the assistant for which the thread should be created. x-ms-client-name: assistantId thread: $ref: '#/definitions/AssistantThreadCreationOptions' description: The details used to create the new thread. model: type: string description: The overridden model that the assistant should use to run the thread. instructions: type: string description: The overridden system instructions the assistant should use to run the thread. tools: type: array description: The overridden list of enabled tools the assistant should use to run the thread. items: $ref: '#/definitions/ToolDefinition' x-ms-identifiers: [] 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: - assistant_id RunStepType: type: string description: The possible types of run steps. enum: - message_creation - tool_calls x-ms-enum: name: RunStepType modelAsString: true values: - name: messageCreation value: message_creation description: Represents a run step to create a message. - name: toolCalls value: tool_calls description: Represents a run step that calls tools. CommunicationIdentifierModel: $ref: ../../../Common/stable/2023-11-15/common.json#/definitions/CommunicationIdentifierModel RunStepDetails: type: object description: An abstract representation of the details for a run step. properties: type: $ref: '#/definitions/RunStepType' description: The object type. discriminator: type required: - type CreateChatThreadRequest: description: Request payload for creating a chat thread. required: - topic type: object properties: topic: description: The chat thread topic. type: string example: Lunch Thread participants: description: Participants to be added to the chat thread. type: array items: $ref: '#/definitions/ChatParticipant' metadata: description: Contextual metadata for the thread. The metadata consists of name/value pairs. The total size of all metadata pairs can be up to 1KB in size. type: object additionalProperties: type: string retentionPolicy: $ref: '#/definitions/ChatRetentionPolicy' MessageContent: type: object description: An abstract representation of a single item of thread message content. properties: type: type: string description: The object type. discriminator: type required: - type ThreadRun: type: object description: Data representing a single evaluation run of an assistant thread. properties: id: type: string description: The identifier, which can be referenced in API endpoints. object: type: string description: The object type, which is always 'thread.run'. enum: - thread.run x-ms-enum: modelAsString: false thread_id: type: string description: The ID of the thread associated with this run. x-ms-client-name: threadId assistant_id: type: string description: The ID of the assistant associated with the thread this run was performed against. x-ms-client-name: assistantId status: $ref: '#/definitions/RunStatus' description: The status of the assistant thread run. required_action: type: object description: The details of the action required for the assistant thread run to continue. x-nullable: true allOf: - $ref: '#/definitions/RequiredAction' x-ms-client-name: requiredAction last_error: type: object description: The last error, if any, encountered by this assistant thread run. x-nullable: true allOf: - $ref: '#/definitions/RunError' x-ms-client-name: lastError model: type: string description: The ID of the model to use. instructions: type: string description: The overridden system instructions used for this assistant thread run. tools: type: array description: The overridden enabled tools used for this assistant thread run. 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 created_at: type: integer format: unixtime description: The Unix timestamp, in seconds, representing when this object was created. x-ms-client-name: createdAt expires_at: type: string format: date-time description: The Unix timestamp, in seconds, representing when this item expires. x-nullable: true x-ms-client-name: expiresAt started_at: type: string format: date-time description: The Unix timestamp, in seconds, representing when this item was started. x-nullable: true x-ms-client-name: startedAt completed_at: type: string format: date-time description: The Unix timestamp, in seconds, representing when this completed. x-nullable: true x-ms-client-name: completedAt cancelled_at: type: string format: date-time description: The Unix timestamp, in seconds, representing when this was cancelled. x-nullable: true x-ms-client-name: cancelledAt failed_at: type: string format: date-time description: The Unix timestamp, in seconds, representing when this failed. x-nullable: true x-ms-client-name: failedAt 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 - thread_id - assistant_id - status - last_error - model - instructions - tools - file_ids - created_at - expires_at - started_at - completed_at - cancelled_at - failed_at - metadata ToolOutput: type: object description: The data provided during a tool outputs submission to resolve pending tool calls and allow the model to continue. properties: tool_call_id: type: string description: The ID of the tool call being resolved, as provided in the tool calls of a required action from a run. x-ms-client-name: toolCallId output: type: string description: The output from the tool to be submitted. ChatRetentionPolicy: description: Data retention policy for auto deletion. type: object discriminator: kind properties: kind: description: Retention Policy Type enum: - threadCreationDate - none type: string x-ms-enum: name: RetentionPolicyKind modelAsString: true values: - value: threadCreationDate description: Thread retention policy based on thread creation date. - value: none description: No thread retention policy required: - kind ChatMessageReadReceipt: description: A chat message read receipt indicates the time a chat message was read by a recipient. required: - chatMessageId - readOn - senderCommunicationIdentifier type: object properties: senderCommunicationIdentifier: $ref: '#/definitions/CommunicationIdentifierModel' chatMessageId: description: Id of the chat message that has been read. This id is generated by the server. type: string example: '1591137790240' readOn: format: date-time description: 'The time at which the message was read. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.' type: string example: '2020-10-30T10:50:50Z' MessageFile: type: object description: Information about a file attached to an assistant thread message. properties: id: type: string description: The identifier, which can be referenced in API endpoints. object: type: string description: The object type, which is always 'thread.message.file'. enum: - thread.message.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 message_id: type: string description: The ID of the message that this file is attached to. x-ms-client-name: messageId required: - id - object - created_at - message_id ThreadMessage: type: object description: A single message within an assistant thread. properties: id: type: string description: The identifier, which can be referenced in API endpoints. object: type: string description: The object type, which is always 'thread.message'. enum: - thread.message 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 thread_id: type: string description: The ID of the thread that this message belongs to. x-ms-client-name: threadId role: $ref: '#/definitions/MessageRole' description: The role associated with the assistant thread message. content: type: array description: The list of content items associated with the assistant thread message. items: $ref: '#/definitions/MessageContent' x-ms-identifiers: [] assistant_id: type: string description: If applicable, the ID of the assistant that authored this message. x-ms-client-name: assistantId run_id: type: string description: If applicable, the ID of the run associated with the authoring of this message. x-ms-client-name: runId file_ids: type: array description: 'A list of file IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files.' 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 - thread_id - role - content - file_ids - metadata SendReadReceiptRequest: description: Request payload for sending a read receipt. required: - chatMessageId type: object properties: chatMessageId: description: Id of the latest chat message read by the user. type: string example: '1592435762364' ChatMessageReadReceiptsCollection: description: A paged collection of chat message read receipts. required: - value type: object properties: value: description: Collection of chat message read receipts. type: array items: $ref: '#/definitions/ChatMessageReadReceipt' nextLink: description: If there are more chat message read receipts that can be retrieved, the next link will be populated. type: string readOnly: true parameters: ApiVersionParameter: in: query name: api-version description: Version of API to invoke. required: true type: string x-ms-parameter-location: method x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'