{ "swagger": "2.0", "info": { "title": "Azure AI", "version": "2025-05-01", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "x-ms-parameterized-host": { "hostTemplate": "{endpoint}", "useSchemePrefix": false, "parameters": [ { "name": "endpoint", "in": "path", "description": "Project endpoint in the form of: https://.services.ai.azure.com/api/projects/", "required": true, "type": "string", "format": "uri", "x-ms-skip-url-encoding": true } ] }, "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "OAuth2Auth": [ "https://ai.azure.com/.default" ] } ], "securityDefinitions": { "OAuth2Auth": { "type": "oauth2", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", "scopes": { "https://ai.azure.com/.default": "" } } }, "tags": [], "paths": { "/assistants": { "get": { "operationId": "ListAgents", "description": "Gets a list of agents that were previously created.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "limit", "in": "query", "description": "A limit on the number of objects to be returned on one page. 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 agents.", "schema": { "type": "object", "description": "The response data for a requested list of items.", "properties": { "data": { "type": "array", "description": "The requested list of items.", "items": { "$ref": "#/definitions/Agent" } }, "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": [ "data", "has_more" ] } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "ListAgents_MaximumSet": { "$ref": "./examples/ListAgents_MaximumSet_Gen.json" }, "ListAgents_MinimumSet": { "$ref": "./examples/ListAgents_MinimumSet_Gen.json" } } }, "post": { "operationId": "CreateAgent", "description": "Creates a new agent.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CreateAgentOptions" } } ], "responses": { "200": { "description": "The new agent instance.", "schema": { "$ref": "#/definitions/Agent" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "CreateAgent_MaximumSet": { "$ref": "./examples/CreateAgent_MaximumSet_Gen.json" }, "CreateAgent_MinimumSet": { "$ref": "./examples/CreateAgent_MinimumSet_Gen.json" } } } }, "/assistants/{assistantId}": { "get": { "operationId": "GetAgent", "description": "Retrieves an existing agent.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "$ref": "#/parameters/GetAgentOptions" } ], "responses": { "200": { "description": "The requested agent instance.", "schema": { "$ref": "#/definitions/Agent" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "GetAgent_MaximumSet": { "$ref": "./examples/GetAgent_MaximumSet_Gen.json" }, "GetAgent_MinimumSet": { "$ref": "./examples/GetAgent_MinimumSet_Gen.json" } } }, "post": { "operationId": "UpdateAgent", "description": "Modifies an existing agent.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "$ref": "#/parameters/UpdateAgentOptions.assistantId" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UpdateAgentOptions" } } ], "responses": { "200": { "description": "The updated agent instance.", "schema": { "$ref": "#/definitions/Agent" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "UpdateAgent_MaximumSet": { "$ref": "./examples/UpdateAgent_MaximumSet_Gen.json" }, "UpdateAgent_MinimumSet": { "$ref": "./examples/UpdateAgent_MinimumSet_Gen.json" } } }, "delete": { "operationId": "DeleteAgent", "description": "Deletes an agent.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "$ref": "#/parameters/DeleteAgentOptions" } ], "responses": { "200": { "description": "Status information about the requested deletion operation.", "schema": { "$ref": "#/definitions/AgentDeletionStatus" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "DeleteAgent_MaximumSet": { "$ref": "./examples/DeleteAgent_MaximumSet_Gen.json" }, "DeleteAgent_MinimumSet": { "$ref": "./examples/DeleteAgent_MinimumSet_Gen.json" } } } }, "/files": { "get": { "operationId": "Files_ListFiles", "description": "Gets a list of previously uploaded files.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "purpose", "in": "query", "description": "The purpose of the file.", "required": false, "type": "string", "enum": [ "assistants", "assistants_output", "vision" ], "x-ms-enum": { "name": "FilePurpose", "modelAsString": true, "values": [ { "name": "agents", "value": "assistants", "description": "Indicates a file is used as input to agents." }, { "name": "agentsOutput", "value": "assistants_output", "description": "Indicates a file is used as output by agents." }, { "name": "vision", "value": "vision", "description": "Indicates a file is used as input to a vision operation." } ] } } ], "responses": { "200": { "description": "The requested list of files.", "schema": { "$ref": "#/definitions/FileListResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Files_ListFiles_MaximumSet": { "$ref": "./examples/Files_ListFiles_MaximumSet_Gen.json" }, "Files_ListFiles_MinimumSet": { "$ref": "./examples/Files_ListFiles_MinimumSet_Gen.json" } } }, "post": { "operationId": "Files_UploadFile", "description": "Uploads a file for use by other operations.", "consumes": [ "multipart/form-data" ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "file", "in": "formData", "description": "The file data, in bytes.", "required": true, "type": "file" }, { "name": "purpose", "in": "formData", "description": "The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning.", "required": true, "type": "string", "enum": [ "assistants", "assistants_output", "vision" ], "x-ms-enum": { "name": "FilePurpose", "modelAsString": true, "values": [ { "name": "agents", "value": "assistants", "description": "Indicates a file is used as input to agents." }, { "name": "agentsOutput", "value": "assistants_output", "description": "Indicates a file is used as output by agents." }, { "name": "vision", "value": "vision", "description": "Indicates a file is used as input to a vision operation." } ] } }, { "name": "filename", "in": "formData", "description": "The name of the file.", "required": false, "type": "string" } ], "responses": { "200": { "description": "A representation of the uploaded file.", "schema": { "$ref": "#/definitions/FileInfo" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Files_UploadFile_MaximumSet": { "$ref": "./examples/Files_UploadFile_MaximumSet_Gen.json" }, "Files_UploadFile_MinimumSet": { "$ref": "./examples/Files_UploadFile_MinimumSet_Gen.json" } } } }, "/files/{fileId}": { "get": { "operationId": "Files_GetFile", "description": "Returns information about a specific file. Does not retrieve file content.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "fileId", "in": "path", "description": "The ID of the file to retrieve.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/FileInfo" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Files_GetFile_MaximumSet": { "$ref": "./examples/Files_GetFile_MaximumSet_Gen.json" }, "Files_GetFile_MinimumSet": { "$ref": "./examples/Files_GetFile_MinimumSet_Gen.json" } } }, "delete": { "operationId": "Files_DeleteFile", "description": "Delete a previously uploaded file.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "fileId", "in": "path", "description": "The ID of the file to delete.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Status of the deletion operation.", "schema": { "$ref": "#/definitions/FileDeletionStatus" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Files_DeleteFile_MaximumSet": { "$ref": "./examples/Files_DeleteFile_MaximumSet_Gen.json" }, "Files_DeleteFile_MinimumSet": { "$ref": "./examples/Files_DeleteFile_MinimumSet_Gen.json" } } } }, "/files/{fileId}/content": { "get": { "operationId": "Files_GetFileContent", "description": "Retrieves the raw content of a specific file.", "produces": [ "application/octet-stream", "application/json" ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "fileId", "in": "path", "description": "The ID of the file to retrieve.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "type": "file" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Files_GetFileContent_MaximumSet": { "$ref": "./examples/Files_GetFileContent_MaximumSet_Gen.json" }, "Files_GetFileContent_MinimumSet": { "$ref": "./examples/Files_GetFileContent_MinimumSet_Gen.json" } } } }, "/threads": { "get": { "operationId": "Threads_ListThreads", "description": "Gets a list of threads that were previously created.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "limit", "in": "query", "description": "A limit on the number of objects to be returned on one page. 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 threads.", "schema": { "type": "object", "description": "The response data for a requested list of items.", "properties": { "data": { "type": "array", "description": "The requested list of items.", "items": { "$ref": "#/definitions/AgentThread" } }, "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": [ "data", "has_more" ] } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Threads_ListThreads_MaximumSet": { "$ref": "./examples/Threads_ListThreads_MaximumSet_Gen.json" }, "Threads_ListThreads_MinimumSet": { "$ref": "./examples/Threads_ListThreads_MinimumSet_Gen.json" } } }, "post": { "operationId": "Threads_CreateThread", "description": "Creates a new thread. Threads contain messages and can be run by agents.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/AgentThreadCreationOptions" } } ], "responses": { "200": { "description": "Information about the newly created thread.", "schema": { "$ref": "#/definitions/AgentThread" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Threads_CreateThread_MaximumSet": { "$ref": "./examples/Threads_CreateThread_MaximumSet_Gen.json" }, "Threads_CreateThread_MinimumSet": { "$ref": "./examples/Threads_CreateThread_MinimumSet_Gen.json" } } } }, "/threads/{threadId}": { "get": { "operationId": "Threads_GetThread", "description": "Gets information about an existing thread.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Information about the requested thread.", "schema": { "$ref": "#/definitions/AgentThread" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Threads_GetThread_MaximumSet": { "$ref": "./examples/Threads_GetThread_MaximumSet_Gen.json" }, "Threads_GetThread_MinimumSet": { "$ref": "./examples/Threads_GetThread_MinimumSet_Gen.json" } } }, "post": { "operationId": "Threads_UpdateThread", "description": "Modifies an existing thread.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "$ref": "#/parameters/UpdateAgentThreadOptions.threadId" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UpdateAgentThreadOptions" } } ], "responses": { "200": { "description": "Information about the modified thread.", "schema": { "$ref": "#/definitions/AgentThread" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Threads_UpdateThread_MaximumSet": { "$ref": "./examples/Threads_UpdateThread_MaximumSet_Gen.json" }, "Threads_UpdateThread_MinimumSet": { "$ref": "./examples/Threads_UpdateThread_MinimumSet_Gen.json" } } }, "delete": { "operationId": "Threads_DeleteThread", "description": "Deletes an existing thread.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Status information about the requested thread deletion operation.", "schema": { "$ref": "#/definitions/ThreadDeletionStatus" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Threads_DeleteThread_MaximumSet": { "$ref": "./examples/Threads_DeleteThread_MaximumSet_Gen.json" }, "Threads_DeleteThread_MinimumSet": { "$ref": "./examples/Threads_DeleteThread_MinimumSet_Gen.json" } } } }, "/threads/{threadId}/messages": { "get": { "operationId": "Messages_ListMessages", "description": "Gets a list of messages that exist on a thread.", "parameters": [ { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "run_id", "in": "query", "description": "Filter messages by the run ID that generated them.", "required": false, "type": "string", "x-ms-client-name": "runId" }, { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "limit", "in": "query", "description": "A limit on the number of objects to be returned on one page. 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": { "data": { "type": "array", "description": "The requested list of items.", "items": { "$ref": "#/definitions/ThreadMessage" } }, "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": [ "data", "has_more" ] } } }, "x-ms-examples": { "Messages_ListMessages_MaximumSet": { "$ref": "./examples/Messages_ListMessages_MaximumSet_Gen.json" }, "Messages_ListMessages_MinimumSet": { "$ref": "./examples/Messages_ListMessages_MinimumSet_Gen.json" } } }, "post": { "operationId": "Messages_CreateMessage", "description": "Creates a new message on a specified thread.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ThreadMessageOptions" } } ], "responses": { "200": { "description": "A representation of the new message.", "schema": { "$ref": "#/definitions/ThreadMessage" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Messages_CreateMessage_MaximumSet": { "$ref": "./examples/Messages_CreateMessage_MaximumSet_Gen.json" }, "Messages_CreateMessage_MinimumSet": { "$ref": "./examples/Messages_CreateMessage_MinimumSet_Gen.json" } } } }, "/threads/{threadId}/messages/{messageId}": { "get": { "operationId": "Messages_GetMessage", "description": "Retrieves an existing message.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "messageId", "in": "path", "description": "Identifier of the message.", "required": true, "type": "string" } ], "responses": { "200": { "description": "A representation of the requested message.", "schema": { "$ref": "#/definitions/ThreadMessage" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Messages_GetMessage_MaximumSet": { "$ref": "./examples/Messages_GetMessage_MaximumSet_Gen.json" }, "Messages_GetMessage_MinimumSet": { "$ref": "./examples/Messages_GetMessage_MinimumSet_Gen.json" } } }, "post": { "operationId": "Messages_UpdateMessage", "description": "Modifies an existing message on an existing thread.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "messageId", "in": "path", "description": "Identifier of the message.", "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" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Messages_UpdateMessage_MaximumSet": { "$ref": "./examples/Messages_UpdateMessage_MaximumSet_Gen.json" }, "Messages_UpdateMessage_MinimumSet": { "$ref": "./examples/Messages_UpdateMessage_MinimumSet_Gen.json" } } } }, "/threads/{threadId}/runs": { "get": { "operationId": "Runs_ListRuns", "description": "Gets a list of runs for a specified thread.", "parameters": [ { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "limit", "in": "query", "description": "A limit on the number of objects to be returned on one page. 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": { "data": { "type": "array", "description": "The requested list of items.", "items": { "$ref": "#/definitions/ThreadRun" } }, "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": [ "data", "has_more" ] } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Runs_ListRuns_MaximumSet": { "$ref": "./examples/Runs_ListRuns_MaximumSet_Gen.json" }, "Runs_ListRuns_MinimumSet": { "$ref": "./examples/Runs_ListRuns_MinimumSet_Gen.json" } } }, "post": { "operationId": "Runs_CreateRun", "description": "Creates a new run for an agent thread.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "include[]", "in": "query", "description": "A list of additional fields to include in the response.\nCurrently the only supported value is `step_details.tool_calls[*].file_search.results[*].content`\nto fetch the file search result content.", "required": false, "type": "array", "items": { "type": "string", "enum": [ "step_details.tool_calls[*].file_search.results[*].content" ], "x-ms-enum": { "name": "RunAdditionalFieldList", "modelAsString": true, "values": [ { "name": "FileSearchContents", "value": "step_details.tool_calls[*].file_search.results[*].content", "description": "File search result content." } ] } }, "collectionFormat": "csv", "x-ms-client-name": "include" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CreateRunOptions" } } ], "responses": { "200": { "description": "Information about the new thread run.", "schema": { "$ref": "#/definitions/ThreadRun" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Runs_CreateRun_MaximumSet": { "$ref": "./examples/Runs_CreateRun_MaximumSet_Gen.json" }, "Runs_CreateRun_MinimumSet": { "$ref": "./examples/Runs_CreateRun_MinimumSet_Gen.json" } } } }, "/threads/{threadId}/runs/{runId}": { "get": { "operationId": "Runs_GetRun", "description": "Gets an existing run from an existing thread.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "runId", "in": "path", "description": "Identifier of the run.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The requested information about the specified thread run.", "schema": { "$ref": "#/definitions/ThreadRun" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Runs_GetRun_MaximumSet": { "$ref": "./examples/Runs_GetRun_MaximumSet_Gen.json" }, "Runs_GetRun_MinimumSet": { "$ref": "./examples/Runs_GetRun_MinimumSet_Gen.json" } } }, "post": { "operationId": "Runs_UpdateRun", "description": "Modifies an existing thread run.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "runId", "in": "path", "description": "Identifier of the run.", "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" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Runs_UpdateRun_MaximumSet": { "$ref": "./examples/Runs_UpdateRun_MaximumSet_Gen.json" }, "Runs_UpdateRun_MinimumSet": { "$ref": "./examples/Runs_UpdateRun_MinimumSet_Gen.json" } } } }, "/threads/{threadId}/runs/{runId}/cancel": { "post": { "operationId": "Runs_CancelRun", "description": "Cancels a run of an in‐progress thread.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "runId", "in": "path", "description": "Identifier of the run.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Updated information about the cancelled run.", "schema": { "$ref": "#/definitions/ThreadRun" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Runs_CancelRun_MaximumSet": { "$ref": "./examples/Runs_CancelRun_MaximumSet_Gen.json" }, "Runs_CancelRun_MinimumSet": { "$ref": "./examples/Runs_CancelRun_MinimumSet_Gen.json" } } } }, "/threads/{threadId}/runs/{runId}/steps": { "get": { "operationId": "RunSteps_ListRunSteps", "description": "Gets a list of run steps from a thread run.", "parameters": [ { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "runId", "in": "path", "description": "Identifier of the run.", "required": true, "type": "string" }, { "name": "include[]", "in": "query", "description": "A list of additional fields to include in the response.\nCurrently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.", "required": false, "type": "array", "items": { "type": "string", "enum": [ "step_details.tool_calls[*].file_search.results[*].content" ], "x-ms-enum": { "name": "RunAdditionalFieldList", "modelAsString": true, "values": [ { "name": "FileSearchContents", "value": "step_details.tool_calls[*].file_search.results[*].content", "description": "File search result content." } ] } }, "collectionFormat": "csv", "x-ms-client-name": "include" }, { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "limit", "in": "query", "description": "A limit on the number of objects to be returned on one page. 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": { "data": { "type": "array", "description": "The requested list of items.", "items": { "$ref": "#/definitions/RunStep" } }, "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": [ "data", "has_more" ] } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "RunSteps_ListRunSteps_MaximumSet": { "$ref": "./examples/RunSteps_ListRunSteps_MaximumSet_Gen.json" }, "RunSteps_ListRunSteps_MinimumSet": { "$ref": "./examples/RunSteps_ListRunSteps_MinimumSet_Gen.json" } } } }, "/threads/{threadId}/runs/{runId}/steps/{stepId}": { "get": { "operationId": "RunSteps_GetRunStep", "description": "Retrieves a single run step from a thread run.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "runId", "in": "path", "description": "Identifier of the run.", "required": true, "type": "string" }, { "name": "stepId", "in": "path", "description": "Identifier of the run step.", "required": true, "type": "string" }, { "name": "include[]", "in": "query", "description": "A list of additional fields to include in the response.\nCurrently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.", "required": false, "type": "array", "items": { "type": "string", "enum": [ "step_details.tool_calls[*].file_search.results[*].content" ], "x-ms-enum": { "name": "RunAdditionalFieldList", "modelAsString": true, "values": [ { "name": "FileSearchContents", "value": "step_details.tool_calls[*].file_search.results[*].content", "description": "File search result content." } ] } }, "collectionFormat": "csv", "x-ms-client-name": "include" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RunStep" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "RunSteps_GetRunStep_MaximumSet": { "$ref": "./examples/RunSteps_GetRunStep_MaximumSet_Gen.json" }, "RunSteps_GetRunStep_MinimumSet": { "$ref": "./examples/RunSteps_GetRunStep_MinimumSet_Gen.json" } } } }, "/threads/{threadId}/runs/{runId}/submit_tool_outputs": { "post": { "operationId": "Runs_SubmitToolOutputsToRun", "description": "Submits outputs from tools as requested by tool calls in a run.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "threadId", "in": "path", "description": "Identifier of the thread.", "required": true, "type": "string" }, { "name": "runId", "in": "path", "description": "Identifier of the run.", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "tool_outputs": { "type": "array", "description": "A list of tools for which the outputs are being submitted", "items": { "$ref": "#/definitions/StructuredToolOutput" }, "x-ms-client-name": "toolOutputs" }, "stream": { "type": "boolean", "description": "If true, returns a stream of events that happen during the Run as SSE, terminating at `[DONE]`.", "x-nullable": true } }, "required": [ "tool_outputs" ] } } ], "responses": { "200": { "description": "Updated information about the run.", "schema": { "$ref": "#/definitions/ThreadRun" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "Runs_SubmitToolOutputsToRun_MaximumSet": { "$ref": "./examples/Runs_SubmitToolOutputsToRun_MaximumSet_Gen.json" }, "Runs_SubmitToolOutputsToRun_MinimumSet": { "$ref": "./examples/Runs_SubmitToolOutputsToRun_MinimumSet_Gen.json" } } } }, "/threads/runs": { "post": { "operationId": "CreateThreadAndRun", "description": "Creates a new agent thread and immediately starts a run using that new thread.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CreateAndRunThreadOptions" } } ], "responses": { "200": { "description": "Information about the newly created thread run.", "schema": { "$ref": "#/definitions/ThreadRun" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "CreateThreadAndRun_MaximumSet": { "$ref": "./examples/CreateThreadAndRun_MaximumSet_Gen.json" }, "CreateThreadAndRun_MinimumSet": { "$ref": "./examples/CreateThreadAndRun_MinimumSet_Gen.json" } } } }, "/vector_stores": { "get": { "operationId": "VectorStores_ListVectorStores", "description": "Returns a list of vector stores.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "limit", "in": "query", "description": "A limit on the number of objects to be returned on one page. 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 request has succeeded.", "schema": { "type": "object", "description": "The response data for a requested list of items.", "properties": { "data": { "type": "array", "description": "The requested list of items.", "items": { "$ref": "#/definitions/VectorStore" } }, "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": [ "data", "has_more" ] } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStores_ListVectorStores_MaximumSet": { "$ref": "./examples/VectorStores_ListVectorStores_MaximumSet_Gen.json" }, "VectorStores_ListVectorStores_MinimumSet": { "$ref": "./examples/VectorStores_ListVectorStores_MinimumSet_Gen.json" } } }, "post": { "operationId": "VectorStores_CreateVectorStore", "description": "Creates a vector store.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/VectorStoreOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStore" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStores_CreateVectorStore_MaximumSet": { "$ref": "./examples/VectorStores_CreateVectorStore_MaximumSet_Gen.json" }, "VectorStores_CreateVectorStore_MinimumSet": { "$ref": "./examples/VectorStores_CreateVectorStore_MinimumSet_Gen.json" } } } }, "/vector_stores/{vectorStoreId}": { "get": { "operationId": "VectorStores_GetVectorStore", "description": "Returns the vector store object matching the specified ID.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStore" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStores_GetVectorStore_MaximumSet": { "$ref": "./examples/VectorStores_GetVectorStore_MaximumSet_Gen.json" }, "VectorStores_GetVectorStore_MinimumSet": { "$ref": "./examples/VectorStores_GetVectorStore_MinimumSet_Gen.json" } } }, "post": { "operationId": "VectorStores_ModifyVectorStore", "description": "Modifies an existing vector store.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/VectorStoreUpdateOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStore" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStores_ModifyVectorStore_MaximumSet": { "$ref": "./examples/VectorStores_ModifyVectorStore_MaximumSet_Gen.json" }, "VectorStores_ModifyVectorStore_MinimumSet": { "$ref": "./examples/VectorStores_ModifyVectorStore_MinimumSet_Gen.json" } } }, "delete": { "operationId": "VectorStores_DeleteVectorStore", "description": "Deletes the vector store object matching the specified ID.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStoreDeletionStatus" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStores_DeleteVectorStore_MaximumSet": { "$ref": "./examples/VectorStores_DeleteVectorStore_MaximumSet_Gen.json" }, "VectorStores_DeleteVectorStore_MinimumSet": { "$ref": "./examples/VectorStores_DeleteVectorStore_MinimumSet_Gen.json" } } } }, "/vector_stores/{vectorStoreId}/file_batches": { "post": { "operationId": "VectorStoreFileBatches_CreateVectorStoreFileBatch", "description": "Create a vector store file batch.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "file_ids": { "type": "array", "description": "List of file identifiers.", "minItems": 1, "maxItems": 500, "items": { "type": "string" }, "x-ms-client-name": "fileIds" }, "data_sources": { "type": "array", "description": "List of Azure assets.", "minItems": 1, "maxItems": 500, "items": { "$ref": "#/definitions/VectorStoreDataSource" }, "x-ms-client-name": "dataSources" }, "chunking_strategy": { "$ref": "#/definitions/VectorStoreChunkingStrategyRequest", "description": "The chunking strategy used to chunk the file(s). If not set, will use the auto strategy.", "x-ms-client-name": "chunkingStrategy" } } } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStoreFileBatch" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStoreFileBatches_CreateVectorStoreFileBatch_MaximumSet": { "$ref": "./examples/VectorStoreFileBatches_CreateVectorStoreFileBatch_MaximumSet_Gen.json" }, "VectorStoreFileBatches_CreateVectorStoreFileBatch_MinimumSet": { "$ref": "./examples/VectorStoreFileBatches_CreateVectorStoreFileBatch_MinimumSet_Gen.json" } } } }, "/vector_stores/{vectorStoreId}/file_batches/{batchId}": { "get": { "operationId": "VectorStoreFileBatches_GetVectorStoreFileBatch", "description": "Retrieve a vector store file batch.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" }, { "name": "batchId", "in": "path", "description": "Identifier of the file batch.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStoreFileBatch" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStoreFileBatches_GetVectorStoreFileBatch_MaximumSet": { "$ref": "./examples/VectorStoreFileBatches_GetVectorStoreFileBatch_MaximumSet_Gen.json" }, "VectorStoreFileBatches_GetVectorStoreFileBatch_MinimumSet": { "$ref": "./examples/VectorStoreFileBatches_GetVectorStoreFileBatch_MinimumSet_Gen.json" } } } }, "/vector_stores/{vectorStoreId}/file_batches/{batchId}/cancel": { "post": { "operationId": "VectorStoreFileBatches_CancelVectorStoreFileBatch", "description": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" }, { "name": "batchId", "in": "path", "description": "Identifier of the file batch.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStoreFileBatch" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStoreFileBatches_CancelVectorStoreFileBatch_MaximumSet": { "$ref": "./examples/VectorStoreFileBatches_CancelVectorStoreFileBatch_MaximumSet_Gen.json" }, "VectorStoreFileBatches_CancelVectorStoreFileBatch_MinimumSet": { "$ref": "./examples/VectorStoreFileBatches_CancelVectorStoreFileBatch_MinimumSet_Gen.json" } } } }, "/vector_stores/{vectorStoreId}/file_batches/{batchId}/files": { "get": { "operationId": "VectorStoreFileBatches_ListVectorStoreFileBatchFiles", "description": "Returns a list of vector store files in a batch.", "parameters": [ { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" }, { "name": "batchId", "in": "path", "description": "Identifier of the file batch.", "required": true, "type": "string" }, { "name": "filter", "in": "query", "description": "Filter by file status.", "required": false, "type": "string", "enum": [ "in_progress", "completed", "failed", "cancelled" ], "x-ms-enum": { "name": "VectorStoreFileStatusFilter", "modelAsString": true, "values": [ { "name": "inProgress", "value": "in_progress", "description": "Retrieve only files that are currently being processed" }, { "name": "completed", "value": "completed", "description": "Retrieve only files that have been successfully processed" }, { "name": "failed", "value": "failed", "description": "Retrieve only files that have failed to process" }, { "name": "cancelled", "value": "cancelled", "description": "Retrieve only files that were cancelled" } ] } }, { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "limit", "in": "query", "description": "A limit on the number of objects to be returned on one page. 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 request has succeeded.", "schema": { "type": "object", "description": "The response data for a requested list of items.", "properties": { "data": { "type": "array", "description": "The requested list of items.", "items": { "$ref": "#/definitions/VectorStoreFile" } }, "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": [ "data", "has_more" ] } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStoreFileBatches_ListVectorStoreFileBatchFiles_MaximumSet": { "$ref": "./examples/VectorStoreFileBatches_ListVectorStoreFileBatchFiles_MaximumSet_Gen.json" }, "VectorStoreFileBatches_ListVectorStoreFileBatchFiles_MinimumSet": { "$ref": "./examples/VectorStoreFileBatches_ListVectorStoreFileBatchFiles_MinimumSet_Gen.json" } } } }, "/vector_stores/{vectorStoreId}/files": { "get": { "operationId": "VectorStoreFiles_ListVectorStoreFiles", "description": "Returns a list of vector store files.", "parameters": [ { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" }, { "name": "filter", "in": "query", "description": "Filter by file status.", "required": false, "type": "string", "enum": [ "in_progress", "completed", "failed", "cancelled" ], "x-ms-enum": { "name": "VectorStoreFileStatusFilter", "modelAsString": true, "values": [ { "name": "inProgress", "value": "in_progress", "description": "Retrieve only files that are currently being processed" }, { "name": "completed", "value": "completed", "description": "Retrieve only files that have been successfully processed" }, { "name": "failed", "value": "failed", "description": "Retrieve only files that have failed to process" }, { "name": "cancelled", "value": "cancelled", "description": "Retrieve only files that were cancelled" } ] } }, { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "limit", "in": "query", "description": "A limit on the number of objects to be returned on one page. 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 request has succeeded.", "schema": { "type": "object", "description": "The response data for a requested list of items.", "properties": { "data": { "type": "array", "description": "The requested list of items.", "items": { "$ref": "#/definitions/VectorStoreFile" } }, "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": [ "data", "has_more" ] } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStoreFiles_ListVectorStoreFiles_MaximumSet": { "$ref": "./examples/VectorStoreFiles_ListVectorStoreFiles_MaximumSet_Gen.json" }, "VectorStoreFiles_ListVectorStoreFiles_MinimumSet": { "$ref": "./examples/VectorStoreFiles_ListVectorStoreFiles_MinimumSet_Gen.json" } } }, "post": { "operationId": "VectorStoreFiles_CreateVectorStoreFile", "description": "Create a vector store file by attaching a file to a vector store.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "file_id": { "type": "string", "description": "Identifier of the file.", "x-ms-client-name": "fileId" }, "data_source": { "$ref": "#/definitions/VectorStoreDataSource", "description": "Azure asset ID.", "x-ms-client-name": "dataSource" }, "chunking_strategy": { "$ref": "#/definitions/VectorStoreChunkingStrategyRequest", "description": "The chunking strategy used to chunk the file. If not set, uses the auto strategy.", "x-ms-client-name": "chunkingStrategy" } } } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStoreFile" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStoreFiles_CreateVectorStoreFile_MaximumSet": { "$ref": "./examples/VectorStoreFiles_CreateVectorStoreFile_MaximumSet_Gen.json" }, "VectorStoreFiles_CreateVectorStoreFile_MinimumSet": { "$ref": "./examples/VectorStoreFiles_CreateVectorStoreFile_MinimumSet_Gen.json" } } } }, "/vector_stores/{vectorStoreId}/files/{fileId}": { "get": { "operationId": "VectorStoreFiles_GetVectorStoreFile", "description": "Retrieves a vector store file.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" }, { "name": "fileId", "in": "path", "description": "Identifier of the file.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStoreFile" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStoreFiles_GetVectorStoreFile_MaximumSet": { "$ref": "./examples/VectorStoreFiles_GetVectorStoreFile_MaximumSet_Gen.json" }, "VectorStoreFiles_GetVectorStoreFile_MinimumSet": { "$ref": "./examples/VectorStoreFiles_GetVectorStoreFile_MinimumSet_Gen.json" } } }, "delete": { "operationId": "VectorStoreFiles_DeleteVectorStoreFile", "description": "Deletes a vector store file. This removes the file‐to‐store link (does not delete the file itself).", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "vectorStoreId", "in": "path", "description": "Identifier of the vector store.", "required": true, "type": "string" }, { "name": "fileId", "in": "path", "description": "Identifier of the file.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/VectorStoreFileDeletionStatus" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/AgentV1Error" } } }, "x-ms-examples": { "VectorStoreFiles_DeleteVectorStoreFile_MaximumSet": { "$ref": "./examples/VectorStoreFiles_DeleteVectorStoreFile_MaximumSet_Gen.json" }, "VectorStoreFiles_DeleteVectorStoreFile_MinimumSet": { "$ref": "./examples/VectorStoreFiles_DeleteVectorStoreFile_MinimumSet_Gen.json" } } } } }, "definitions": { "AISearchIndexResource": { "type": "object", "description": "A AI Search Index resource.", "properties": { "index_connection_id": { "type": "string", "description": "An index connection id in an IndexResource attached to this agent.", "x-ms-client-name": "indexConnectionId" }, "index_name": { "type": "string", "description": "The name of an index in an IndexResource attached to this agent.", "x-ms-client-name": "indexName" }, "query_type": { "$ref": "#/definitions/AzureAISearchQueryType", "description": "Type of query in an AIIndexResource attached to this agent.", "x-ms-client-name": "queryType" }, "top_k": { "type": "integer", "format": "int32", "description": "Number of documents to retrieve from search and present to the model.", "x-ms-client-name": "topK" }, "filter": { "type": "string", "description": "filter string for search resource." }, "index_asset_id": { "type": "string", "description": "Index asset id for search resource.", "x-ms-client-name": "indexAssetId" } } }, "Agent": { "type": "object", "description": "Represents an agent 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 agent.", "x-nullable": true }, "description": { "type": "string", "description": "The description of the agent.", "x-nullable": true }, "model": { "type": "string", "description": "The ID of the model to use." }, "instructions": { "type": "string", "description": "The system instructions for the agent to use.", "x-nullable": true }, "tools": { "type": "array", "description": "The collection of tools enabled for the agent.", "default": [], "items": { "$ref": "#/definitions/ToolDefinition" } }, "tool_resources": { "$ref": "#/definitions/ToolResources", "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter`\ntool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "x-nullable": true, "x-ms-client-name": "toolResources" }, "temperature": { "type": "number", "format": "float", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,\nwhile lower values like 0.2 will make it more focused and deterministic.", "default": 1, "minimum": 0, "maximum": 2, "x-nullable": true }, "top_p": { "type": "number", "format": "float", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.\nSo 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "default": 1, "minimum": 0, "maximum": 1, "x-nullable": true, "x-ms-client-name": "topP" }, "response_format": { "$ref": "#/definitions/AgentsResponseFormatOption", "description": "The response format of the tool calls used by this agent.", "x-nullable": true, "x-ms-client-name": "responseFormat" }, "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", "tool_resources", "temperature", "top_p", "metadata" ] }, "AgentDeletionStatus": { "type": "object", "description": "The status of an agent 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" ] }, "AgentErrorDetail": { "type": "object", "description": "Describes the error information returned by the agents API.", "properties": { "message": { "type": "string", "description": "Human-readable description of the error.", "x-nullable": true }, "type": { "type": "string", "description": "Error type identifier (e.g. `invalid_request_error`).", "x-nullable": true }, "param": { "type": "string", "description": "Name of the parameter that caused the error, if applicable.", "x-nullable": true }, "code": { "type": "string", "description": "Machine-readable error code.", "x-nullable": true } } }, "AgentStreamEvent": { "type": "string", "description": "Each event in a server-sent events stream has an `event` and `data` property:\n\n```\nevent: thread.created\ndata: {\"id\": \"thread_123\", \"object\": \"thread\", ...}\n```\n\nWe emit events whenever a new object is created, transitions to a new state, or is being\nstreamed in parts (deltas). For example, we emit `thread.run.created` when a new run\nis created, `thread.run.completed` when a run completes, and so on. When an Agent chooses\nto create a message during a run, we emit a `thread.message.created event`, a\n`thread.message.in_progress` event, many `thread.message.delta` events, and finally a\n`thread.message.completed` event.\n\nWe may add additional events over time, so we recommend handling unknown events gracefully\nin your code.", "enum": [ "thread.created", "thread.run.created", "thread.run.queued", "thread.run.in_progress", "thread.run.requires_action", "thread.run.completed", "thread.run.incomplete", "thread.run.failed", "thread.run.cancelling", "thread.run.cancelled", "thread.run.expired", "thread.run.step.created", "thread.run.step.in_progress", "thread.run.step.delta", "thread.run.step.completed", "thread.run.step.failed", "thread.run.step.cancelled", "thread.run.step.expired", "thread.message.created", "thread.message.in_progress", "thread.message.delta", "thread.message.completed", "thread.message.incomplete", "error", "done" ], "x-ms-enum": { "name": "AgentStreamEvent", "modelAsString": true, "values": [ { "name": "ThreadCreated", "value": "thread.created", "description": "Event sent when a new thread is created. The data of this event is of type AgentThread" }, { "name": "ThreadRunCreated", "value": "thread.run.created", "description": "Event sent when a new run is created. The data of this event is of type ThreadRun" }, { "name": "ThreadRunQueued", "value": "thread.run.queued", "description": "Event sent when a run moves to `queued` status. The data of this event is of type ThreadRun" }, { "name": "ThreadRunInProgress", "value": "thread.run.in_progress", "description": "Event sent when a run moves to `in_progress` status. The data of this event is of type ThreadRun" }, { "name": "ThreadRunRequiresAction", "value": "thread.run.requires_action", "description": "Event sent when a run moves to `requires_action` status. The data of this event is of type ThreadRun" }, { "name": "ThreadRunCompleted", "value": "thread.run.completed", "description": "Event sent when a run is completed. The data of this event is of type ThreadRun" }, { "name": "ThreadRunIncomplete", "value": "thread.run.incomplete", "description": "Event sent when a run ends incomplete. The data of this event is of type ThreadRun" }, { "name": "ThreadRunFailed", "value": "thread.run.failed", "description": "Event sent when a run fails. The data of this event is of type ThreadRun" }, { "name": "ThreadRunCancelling", "value": "thread.run.cancelling", "description": "Event sent when a run moves to `cancelling` status. The data of this event is of type ThreadRun" }, { "name": "ThreadRunCancelled", "value": "thread.run.cancelled", "description": "Event sent when a run is cancelled. The data of this event is of type ThreadRun" }, { "name": "ThreadRunExpired", "value": "thread.run.expired", "description": "Event sent when a run is expired. The data of this event is of type ThreadRun" }, { "name": "ThreadRunStepCreated", "value": "thread.run.step.created", "description": "Event sent when a new thread run step is created. The data of this event is of type RunStep" }, { "name": "ThreadRunStepInProgress", "value": "thread.run.step.in_progress", "description": "Event sent when a run step moves to `in_progress` status. The data of this event is of type RunStep" }, { "name": "ThreadRunStepDelta", "value": "thread.run.step.delta", "description": "Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk" }, { "name": "ThreadRunStepCompleted", "value": "thread.run.step.completed", "description": "Event sent when a run step is completed. The data of this event is of type RunStep" }, { "name": "ThreadRunStepFailed", "value": "thread.run.step.failed", "description": "Event sent when a run step fails. The data of this event is of type RunStep" }, { "name": "ThreadRunStepCancelled", "value": "thread.run.step.cancelled", "description": "Event sent when a run step is cancelled. The data of this event is of type RunStep" }, { "name": "ThreadRunStepExpired", "value": "thread.run.step.expired", "description": "Event sent when a run step is expired. The data of this event is of type RunStep" }, { "name": "ThreadMessageCreated", "value": "thread.message.created", "description": "Event sent when a new message is created. The data of this event is of type ThreadMessage" }, { "name": "ThreadMessageInProgress", "value": "thread.message.in_progress", "description": "Event sent when a message moves to `in_progress` status. The data of this event is of type ThreadMessage" }, { "name": "ThreadMessageDelta", "value": "thread.message.delta", "description": "Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk" }, { "name": "ThreadMessageCompleted", "value": "thread.message.completed", "description": "Event sent when a message is completed. The data of this event is of type ThreadMessage" }, { "name": "ThreadMessageIncomplete", "value": "thread.message.incomplete", "description": "Event sent before a message is completed. The data of this event is of type ThreadMessage" }, { "name": "Error", "value": "error", "description": "Event sent when an error occurs, such as an internal server error or a timeout." }, { "name": "Done", "value": "done", "description": "Event sent when the stream is done." } ] } }, "AgentThread": { "type": "object", "description": "Information about a single thread associated with an agent.", "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" }, "tool_resources": { "$ref": "#/definitions/ToolResources", "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type\nof tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list\nof vector store IDs.", "x-nullable": true, "x-ms-client-name": "toolResources" }, "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", "tool_resources", "metadata" ] }, "AgentThreadCreationOptions": { "type": "object", "description": "The details used to create a new agent thread.", "properties": { "messages": { "type": "array", "description": "The initial messages to associate with the new thread.", "items": { "$ref": "#/definitions/ThreadMessageOptions" } }, "tool_resources": { "$ref": "#/definitions/ToolResources", "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\na list of vector store IDs.", "x-nullable": true, "x-ms-client-name": "toolResources" }, "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" } } } }, "AgentV1Error": { "type": "object", "description": "Error payload returned by the agents API.", "properties": { "error": { "$ref": "#/definitions/AgentErrorDetail", "description": "Represents the error." } }, "required": [ "error" ] }, "AgentsNamedToolChoice": { "type": "object", "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", "properties": { "type": { "$ref": "#/definitions/AgentsNamedToolChoiceType", "description": "the type of tool. If type is `function`, the function name must be set." }, "function": { "$ref": "#/definitions/FunctionName", "description": "The name of the function to call" } }, "required": [ "type" ] }, "AgentsNamedToolChoiceType": { "type": "string", "description": "Available tool types for agents named tools.", "enum": [ "function", "code_interpreter", "file_search", "bing_grounding", "azure_ai_search", "connected_agent" ], "x-ms-enum": { "name": "AgentsNamedToolChoiceType", "modelAsString": true, "values": [ { "name": "function", "value": "function", "description": "Tool type `function`" }, { "name": "codeInterpreter", "value": "code_interpreter", "description": "Tool type `code_interpreter`" }, { "name": "fileSearch", "value": "file_search", "description": "Tool type `file_search`" }, { "name": "bingGrounding", "value": "bing_grounding", "description": "Tool type `bing_grounding`" }, { "name": "azureAISearch", "value": "azure_ai_search", "description": "Tool type `azure_ai_search`" }, { "name": "connectedAgent", "value": "connected_agent", "description": "Tool type `connected_agent`" } ] } }, "AgentsResponseFormat": { "type": "object", "description": "An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run.\nIf `text` the model can return text or any value needed.", "properties": { "type": { "type": "string", "description": "Must be one of `text` or `json_object`.", "default": "text", "enum": [ "text", "json_object" ], "x-ms-enum": { "name": "ResponseFormat", "modelAsString": true, "values": [ { "name": "text", "value": "text", "description": "`text` format should be used for requests involving any sort of ToolCall." }, { "name": "jsonObject", "value": "json_object", "description": "Using `json_object` format will limit the usage of ToolCall to only functions." } ] } } } }, "AgentsResponseFormatMode": { "type": "string", "description": "Represents the mode in which the model will handle the return format of a tool call.", "enum": [ "auto", "none" ], "x-ms-enum": { "name": "AgentsResponseFormatMode", "modelAsString": true, "values": [ { "name": "auto", "value": "auto", "description": "Default value. Let the model handle the return format." }, { "name": "none", "value": "none", "description": "Setting the value to `none`, will result in a 400 Bad request." } ] } }, "AgentsResponseFormatOption": {}, "AgentsToolChoiceOption": {}, "AgentsToolChoiceOptionMode": { "type": "string", "description": "Specifies how the tool choice will be used", "enum": [ "none", "auto" ], "x-ms-enum": { "name": "AgentsToolChoiceOptionMode", "modelAsString": true, "values": [ { "name": "none", "value": "none", "description": "The model will not call a function and instead generates a message." }, { "name": "auto", "value": "auto", "description": "The model can pick between generating a message or calling a function." } ] } }, "AzureAISearchQueryType": { "type": "string", "description": "Available query types for Azure AI Search tool.", "enum": [ "simple", "semantic", "vector", "vector_simple_hybrid", "vector_semantic_hybrid" ], "x-ms-enum": { "name": "AzureAISearchQueryType", "modelAsString": true, "values": [ { "name": "simple", "value": "simple", "description": "Query type `simple`" }, { "name": "semantic", "value": "semantic", "description": "Query type `semantic`" }, { "name": "vector", "value": "vector", "description": "Query type `vector`" }, { "name": "vector_simple_hybrid", "value": "vector_simple_hybrid", "description": "Query type `vector_simple_hybrid`" }, { "name": "vector_semantic_hybrid", "value": "vector_semantic_hybrid", "description": "Query type `vector_semantic_hybrid`" } ] } }, "AzureAISearchToolDefinition": { "type": "object", "description": "The input definition information for an Azure AI search tool as used to configure an agent.", "allOf": [ { "$ref": "#/definitions/ToolDefinition" } ], "x-ms-discriminator-value": "azure_ai_search" }, "AzureAISearchToolResource": { "type": "object", "description": "A set of index resources used by the `azure_ai_search` tool.", "properties": { "indexes": { "type": "array", "description": "The indices attached to this agent. There can be a maximum of 1 index\nresource attached to the agent.", "maxItems": 1, "items": { "$ref": "#/definitions/AISearchIndexResource" }, "x-ms-client-name": "indexList" } } }, "AzureFunctionBinding": { "type": "object", "description": "The structure for keeping storage queue name and URI.", "properties": { "type": { "type": "string", "description": "The type of binding, which is always 'storage_queue'.", "enum": [ "storage_queue" ], "x-ms-enum": { "modelAsString": false } }, "storage_queue": { "$ref": "#/definitions/AzureFunctionStorageQueue", "description": "Storage queue.", "x-ms-client-name": "storageQueue" } }, "required": [ "type", "storage_queue" ] }, "AzureFunctionDefinition": { "type": "object", "description": "The definition of Azure function.", "properties": { "function": { "$ref": "#/definitions/FunctionDefinition", "description": "The definition of azure function and its parameters." }, "input_binding": { "$ref": "#/definitions/AzureFunctionBinding", "description": "Input storage queue. The queue storage trigger runs a function as messages are added to it.", "x-ms-client-name": "inputBinding" }, "output_binding": { "$ref": "#/definitions/AzureFunctionBinding", "description": "Output storage queue. The function writes output to this queue when the input items are processed.", "x-ms-client-name": "outputBinding" } }, "required": [ "function", "input_binding", "output_binding" ] }, "AzureFunctionStorageQueue": { "type": "object", "description": "The structure for keeping storage queue name and URI.", "properties": { "queue_service_endpoint": { "type": "string", "description": "URI to the Azure Storage Queue service allowing you to manipulate a queue.", "x-ms-client-name": "storageServiceEndpoint" }, "queue_name": { "type": "string", "description": "The name of an Azure function storage queue.", "x-ms-client-name": "queueName" } }, "required": [ "queue_service_endpoint", "queue_name" ] }, "AzureFunctionToolDefinition": { "type": "object", "description": "The input definition information for a azure function tool as used to configure an agent.", "properties": { "azure_function": { "$ref": "#/definitions/AzureFunctionDefinition", "description": "The definition of the concrete function that the function tool should call.", "x-ms-client-name": "azureFunction" } }, "required": [ "azure_function" ], "allOf": [ { "$ref": "#/definitions/ToolDefinition" } ], "x-ms-discriminator-value": "azure_function" }, "BingCustomSearchConfiguration": { "type": "object", "description": "A bing custom search configuration.", "properties": { "connection_id": { "type": "string", "description": "Connection id for grounding with bing search", "x-ms-client-name": "connectionId" }, "instance_name": { "type": "string", "description": "Name of the custom configuration instance given to config.", "x-ms-client-name": "instanceName" }, "market": { "type": "string", "description": "The market where the results come from. Typically, market is the country where the user is making the request from. However, it could be a different country if the user is not located in a country where Bing delivers results. The market must be in the form: `-` where `` is an ISO 639-1 language code (neutral culture) and `` is an ISO 3166 country/region (specific culture) code. For example, `en-US`. The string is case insensitive. For a list of possible market values, see [Market codes](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/market-codes). If known, you are encouraged to always specify the market. Specifying the market helps Bing route the request and return an appropriate and optimal response. If you specify a market that is not listed in Market codes, Bing uses a best fit market code based on an internal mapping that is subject to change." }, "set_lang": { "type": "string", "description": "The language to use for user interface strings. You may specify the language using either a 2-letter or 4-letter code. Using 4-letter codes is preferred.\nFor a list of supported language codes, see [Bing supported languages](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/market-codes#bing-supported-language-codes).\nBing loads the localized strings if this parameter contains a valid 2-letter neutral culture code (for example `fr`) or a valid 4-letter specific culture code (`fr-ca`). For example, for `fr-ca`, Bing loads the `fr` neutral culture code strings.\nIf the parameter is not valid (for example, `zh`) or Bing doesn’t support the language (for example, `af`, `af-na`), Bing defaults to `en` (English).\nTo specify the 2-letter code, set this parameter to an ISO 639-1 language code.\nTo specify the 4-letter code, use the form `-` where `` is an ISO 639-1 language code (neutral culture) and `` is an ISO 3166 country/region (specific culture) code. For example, use `en-US` for United States English.\nAlthough optional, you should always specify the language. Typically, you set this parameter to the same language specified by the market value unless the user wants the user interface strings displayed in a different language.", "x-ms-client-name": "setLang" }, "count": { "type": "integer", "format": "int64", "description": "The number of search results to return in the response. The default is 5 and the maximum value is 50. The actual number delivered may be less than requested. \n- It is possible for multiple pages to include some overlap in results. \n- This parameter affects only web page results. It's possible that AI model might not use all search results returned by Bing." }, "freshness": { "type": "string", "description": "Filter search results by the following case-insensitive age values:\n- Day: Return webpages that Bing discovered within the last 24 hours.\n- Week: Return webpages that Bing discovered within the last 7 days.\n- Month: Return webpages that Bing discovered within the last 30 days. To get articles discovered by Bing during a specific timeframe, specify a date range in the form: `YYYY-MM-DD..YYYY-MM-DD`. For example, `freshness=2019-02-01..2019-05-30. To limit the results to a single date, set this parameter to a specific date. For example, freshness=2019-02-04`." } }, "required": [ "connection_id", "instance_name" ] }, "BingGroundingSearchConfiguration": { "type": "object", "description": "Search configuration for Bing Grounding", "properties": { "connection_id": { "type": "string", "description": "Connection id for grounding with bing search", "x-ms-client-name": "connectionId" }, "market": { "type": "string", "description": "The market where the results come from. Typically, market is the country where the user is making the request from. However, it could be a different country if the user is not located in a country where Bing delivers results. The market must be in the form: `-` where `` is an ISO 639-1 language code (neutral culture) and `` is an ISO 3166 country/region (specific culture) code. For example, `en-US`. The string is case insensitive. For a list of possible market values, see [Market codes](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/market-codes). If known, you are encouraged to always specify the market. Specifying the market helps Bing route the request and return an appropriate and optimal response. If you specify a market that is not listed in Market codes, Bing uses a best fit market code based on an internal mapping that is subject to change." }, "set_lang": { "type": "string", "description": "The language to use for user interface strings. You may specify the language using either a 2-letter or 4-letter code. Using 4-letter codes is preferred.\nFor a list of supported language codes, see [Bing supported languages](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/market-codes#bing-supported-language-codes).\nBing loads the localized strings if this parameter contains a valid 2-letter neutral culture code (for example `fr`) or a valid 4-letter specific culture code (`fr-ca`). For example, for `fr-ca`, Bing loads the `fr` neutral culture code strings.\nIf the parameter is not valid (for example, `zh`) or Bing doesn’t support the language (for example, `af`, `af-na`), Bing defaults to `en` (English).\nTo specify the 2-letter code, set this parameter to an ISO 639-1 language code.\nTo specify the 4-letter code, use the form `-` where `` is an ISO 639-1 language code (neutral culture) and `` is an ISO 3166 country/region (specific culture) code. For example, use `en-US` for United States English.\nAlthough optional, you should always specify the language. Typically, you set this parameter to the same language specified by the market value unless the user wants the user interface strings displayed in a different language.", "x-ms-client-name": "setLang" }, "count": { "type": "integer", "format": "int64", "description": "The number of search results to return in the response. The default is 5 and the maximum value is 50. The actual number delivered may be less than requested. \n- It is possible for multiple pages to include some overlap in results. \n- This parameter affects only web page results. It's possible that AI model might not use all search results returned by Bing." }, "freshness": { "type": "string", "description": "Filter search results by the following case-insensitive age values:\n- Day: Return webpages that Bing discovered within the last 24 hours.\n- Week: Return webpages that Bing discovered within the last 7 days.\n- Month: Return webpages that Bing discovered within the last 30 days. To get articles discovered by Bing during a specific timeframe, specify a date range in the form: `YYYY-MM-DD..YYYY-MM-DD`. For example, `freshness=2019-02-01..2019-05-30. To limit the results to a single date, set this parameter to a specific date. For example, freshness=2019-02-04`." } }, "required": [ "connection_id" ] }, "BingGroundingSearchToolParameters": { "type": "object", "description": "The bing grounding search tool parameters.", "properties": { "search_configurations": { "type": "array", "description": "The search configurations attached to this tool. There can be a maximum of 1\nsearch configuration resource attached to the tool.", "maxItems": 1, "items": { "$ref": "#/definitions/BingGroundingSearchConfiguration" }, "x-ms-client-name": "searchConfigurations" } }, "required": [ "search_configurations" ] }, "BingGroundingToolDefinition": { "type": "object", "description": "The input definition information for a bing grounding search tool as used to configure an agent.", "properties": { "bing_grounding": { "$ref": "#/definitions/BingGroundingSearchToolParameters", "description": "The bing grounding search tool parameters." } }, "required": [ "bing_grounding" ], "allOf": [ { "$ref": "#/definitions/ToolDefinition" } ], "x-ms-discriminator-value": "bing_grounding" }, "CodeInterpreterToolDefinition": { "type": "object", "description": "The input definition information for a code interpreter tool as used to configure an agent.", "allOf": [ { "$ref": "#/definitions/ToolDefinition" } ], "x-ms-discriminator-value": "code_interpreter" }, "CodeInterpreterToolResource": { "type": "object", "description": "A set of resources that are used by the `code_interpreter` tool.", "properties": { "file_ids": { "type": "array", "description": "A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files\nassociated with the tool.", "default": [], "maxItems": 20, "items": { "type": "string" }, "x-ms-client-name": "fileIds" }, "data_sources": { "type": "array", "description": "The data sources to be used. This option is mutually exclusive with the `fileIds` property.", "maxItems": 20, "items": { "$ref": "#/definitions/VectorStoreDataSource" }, "x-ms-client-name": "dataSources" } } }, "ConnectedAgentDetails": { "type": "object", "description": "Information for connecting one agent to another as a tool", "properties": { "id": { "type": "string", "description": "The identifier of the child agent." }, "name": { "type": "string", "description": "The name of the agent to be called." }, "description": { "type": "string", "description": "A description of what the agent does, used by the model to choose when and how to call the agent." } }, "required": [ "id", "name", "description" ] }, "ConnectedAgentToolDefinition": { "type": "object", "description": "The input definition information for a connected agent tool which defines a domain specific sub-agent", "properties": { "connected_agent": { "$ref": "#/definitions/ConnectedAgentDetails", "description": "The sub-agent to connect", "x-ms-client-name": "connectedAgent" } }, "required": [ "connected_agent" ], "allOf": [ { "$ref": "#/definitions/ToolDefinition" } ], "x-ms-discriminator-value": "connected_agent" }, "CreateAgentOptions": { "type": "object", "description": "The request details to use when creating a new agent.", "properties": { "model": { "type": "string", "description": "The ID of the model to use." }, "name": { "type": "string", "description": "The name of the new agent.", "x-nullable": true }, "description": { "type": "string", "description": "The description of the new agent.", "x-nullable": true }, "instructions": { "type": "string", "description": "The system instructions for the new agent to use.", "x-nullable": true }, "tools": { "type": "array", "description": "The collection of tools to enable for the new agent.", "default": [], "items": { "$ref": "#/definitions/ToolDefinition" } }, "tool_resources": { "$ref": "#/definitions/ToolResources", "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter`\ntool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "x-nullable": true, "x-ms-client-name": "toolResources" }, "temperature": { "type": "number", "format": "float", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,\nwhile lower values like 0.2 will make it more focused and deterministic.", "default": 1, "minimum": 0, "maximum": 2, "x-nullable": true }, "top_p": { "type": "number", "format": "float", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.\nSo 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "default": 1, "minimum": 0, "maximum": 1, "x-nullable": true, "x-ms-client-name": "topP" }, "response_format": { "$ref": "#/definitions/AgentsResponseFormatOption", "description": "The response format of the tool calls used by this agent.", "x-nullable": true, "x-ms-client-name": "responseFormat" }, "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" ] }, "CreateAndRunThreadOptions": { "type": "object", "description": "The details used when creating and immediately running a new agent thread.", "properties": { "assistant_id": { "type": "string", "description": "The ID of the agent for which the thread should be created.", "x-ms-client-name": "assistantId" }, "thread": { "$ref": "#/definitions/AgentThreadCreationOptions", "description": "The details used to create the new thread. If no thread is provided, an empty one will be created." }, "model": { "type": "string", "description": "The overridden model that the agent should use to run the thread.", "x-nullable": true }, "instructions": { "type": "string", "description": "The overridden system instructions the agent should use to run the thread.", "x-nullable": true }, "tools": { "type": "array", "description": "The overridden list of enabled tools the agent should use to run the thread.", "x-nullable": true, "items": { "$ref": "#/definitions/ToolDefinition" } }, "tool_resources": { "$ref": "#/definitions/ToolResources", "description": "Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis", "x-nullable": true, "x-ms-client-name": "toolResources" }, "stream": { "type": "boolean", "description": "If `true`, returns a stream of events that happen during the Run as server-sent events,\nterminating when the Run enters a terminal state with a `data: [DONE]` message." }, "temperature": { "type": "number", "format": "float", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.", "default": 1, "minimum": 0, "maximum": 2, "x-nullable": true }, "top_p": { "type": "number", "format": "float", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model\nconsiders the results of the tokens with top_p probability mass. So 0.1 means only the tokens\ncomprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "default": 1, "minimum": 0, "maximum": 1, "x-nullable": true, "x-ms-client-name": "topP" }, "max_prompt_tokens": { "type": "integer", "format": "int32", "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only\nthe number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified,\nthe run will end with status `incomplete`. See `incomplete_details` for more info.", "minimum": 256, "x-nullable": true, "x-ms-client-name": "maxPromptTokens" }, "max_completion_tokens": { "type": "integer", "format": "int32", "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only\nthe number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens\nspecified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "minimum": 256, "x-nullable": true, "x-ms-client-name": "maxCompletionTokens" }, "truncation_strategy": { "$ref": "#/definitions/TruncationObject", "description": "The strategy to use for dropping messages as the context windows moves forward.", "x-nullable": true, "x-ms-client-name": "truncationStrategy" }, "tool_choice": { "$ref": "#/definitions/AgentsToolChoiceOption", "description": "Controls whether or not and which tool is called by the model.", "x-nullable": true, "x-ms-client-name": "toolChoice" }, "response_format": { "$ref": "#/definitions/AgentsResponseFormatOption", "description": "Specifies the format that the model must output.", "x-nullable": true, "x-ms-client-name": "responseFormat" }, "parallel_tool_calls": { "type": "boolean", "description": "If `true` functions will run in parallel during tool use.", "x-ms-client-name": "parallelToolCalls" }, "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" ] }, "CreateRunOptions": { "type": "object", "description": "The details used when creating a new run of an agent thread.", "properties": { "assistant_id": { "type": "string", "description": "The ID of the agent that should run the thread.", "x-ms-client-name": "assistantId" }, "model": { "type": "string", "description": "The overridden model name that the agent should use to run the thread.", "x-nullable": true }, "instructions": { "type": "string", "description": "The overridden system instructions that the agent should use to run the thread.", "x-nullable": true }, "additional_instructions": { "type": "string", "description": "Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior\non a per-run basis without overriding other instructions.", "x-nullable": true, "x-ms-client-name": "additionalInstructions" }, "additional_messages": { "type": "array", "description": "Adds additional messages to the thread before creating the run.", "x-nullable": true, "items": { "$ref": "#/definitions/ThreadMessageOptions" }, "x-ms-client-name": "additionalMessages" }, "tools": { "type": "array", "description": "The overridden list of enabled tools that the agent should use to run the thread.", "x-nullable": true, "items": { "$ref": "#/definitions/ToolDefinition" } }, "tool_resources": { "$ref": "#/definitions/ToolResources", "description": "The overridden enabled tool resources that the agent should use to run the thread.", "x-nullable": true }, "stream": { "type": "boolean", "description": "If `true`, returns a stream of events that happen during the Run as server-sent events,\nterminating when the Run enters a terminal state with a `data: [DONE]` message." }, "temperature": { "type": "number", "format": "float", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.", "default": 1, "minimum": 0, "maximum": 2, "x-nullable": true }, "top_p": { "type": "number", "format": "float", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model\nconsiders the results of the tokens with top_p probability mass. So 0.1 means only the tokens\ncomprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "default": 1, "minimum": 0, "maximum": 1, "x-nullable": true, "x-ms-client-name": "topP" }, "max_prompt_tokens": { "type": "integer", "format": "int32", "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only\nthe number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified,\nthe run will end with status `incomplete`. See `incomplete_details` for more info.", "minimum": 256, "x-nullable": true, "x-ms-client-name": "maxPromptTokens" }, "max_completion_tokens": { "type": "integer", "format": "int32", "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort\nto use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of\ncompletion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.", "minimum": 256, "x-nullable": true, "x-ms-client-name": "maxCompletionTokens" }, "truncation_strategy": { "$ref": "#/definitions/TruncationObject", "description": "The strategy to use for dropping messages as the context windows moves forward.", "x-nullable": true, "x-ms-client-name": "truncationStrategy" }, "tool_choice": { "$ref": "#/definitions/AgentsToolChoiceOption", "description": "Controls whether or not and which tool is called by the model.", "x-nullable": true, "x-ms-client-name": "toolChoice" }, "response_format": { "$ref": "#/definitions/AgentsResponseFormatOption", "description": "Specifies the format that the model must output.", "x-nullable": true, "x-ms-client-name": "responseFormat" }, "parallel_tool_calls": { "type": "boolean", "description": "If `true` functions will run in parallel during tool use.", "x-ms-client-name": "parallelToolCalls" }, "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" ] }, "DoneEvent": { "type": "string", "description": "Terminal event indicating the successful end of a stream.", "enum": [ "done" ], "x-ms-enum": { "name": "DoneEvent", "modelAsString": true, "values": [ { "name": "Done", "value": "done", "description": "Event sent when the stream is done." } ] } }, "ErrorEvent": { "type": "string", "description": "Terminal event indicating a server side error while streaming.", "enum": [ "error" ], "x-ms-enum": { "name": "ErrorEvent", "modelAsString": true, "values": [ { "name": "Error", "value": "error", "description": "Event sent when an error occurs, such as an internal server error or a timeout." } ] } }, "FileDeletionStatus": { "type": "object", "description": "A status response from a 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 'file'.", "enum": [ "file" ], "x-ms-enum": { "modelAsString": false } } }, "required": [ "id", "deleted", "object" ] }, "FileInfo": { "type": "object", "description": "Represents an agent that can call the model and use tools.", "properties": { "object": { "type": "string", "description": "The object type, which is always 'file'.", "enum": [ "file" ], "x-ms-enum": { "modelAsString": false } }, "id": { "type": "string", "description": "The identifier, which can be referenced in API endpoints." }, "bytes": { "type": "integer", "format": "int32", "description": "The size of the file, in bytes." }, "filename": { "type": "string", "description": "The name of the file." }, "created_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this object was created.", "x-ms-client-name": "createdAt" }, "purpose": { "$ref": "#/definitions/FilePurpose", "description": "The intended purpose of a file." }, "status": { "$ref": "#/definitions/FileState", "description": "The state of the file. This field is available in Azure OpenAI only." }, "status_details": { "type": "string", "description": "The error message with details in case processing of this file failed. This field is available in Azure OpenAI only.", "x-ms-client-name": "statusDetails" } }, "required": [ "object", "id", "bytes", "filename", "created_at", "purpose" ] }, "FileListResponse": { "type": "object", "description": "The response data from a file list operation.", "properties": { "object": { "type": "string", "description": "The object type, which is always 'list'.", "enum": [ "list" ], "x-ms-enum": { "modelAsString": false } }, "data": { "type": "array", "description": "The files returned for the request.", "items": { "$ref": "#/definitions/FileInfo" } } }, "required": [ "object", "data" ] }, "FilePurpose": { "type": "string", "description": "The possible values denoting the intended usage of a file.", "enum": [ "assistants", "assistants_output", "vision" ], "x-ms-enum": { "name": "FilePurpose", "modelAsString": true, "values": [ { "name": "agents", "value": "assistants", "description": "Indicates a file is used as input to agents." }, { "name": "agentsOutput", "value": "assistants_output", "description": "Indicates a file is used as output by agents." }, { "name": "vision", "value": "vision", "description": "Indicates a file is used as input to a vision operation." } ] } }, "FileSearchRankingOptions": { "type": "object", "description": "Ranking options for file search.", "properties": { "ranker": { "type": "string", "description": "File search ranker." }, "score_threshold": { "type": "number", "format": "float", "description": "Ranker search threshold.", "x-ms-client-name": "scoreThreshold" } }, "required": [ "ranker", "score_threshold" ] }, "FileSearchToolCallContent": { "type": "object", "description": "The file search result content object.", "properties": { "type": { "type": "string", "description": "The type of the content.", "enum": [ "text" ], "x-ms-enum": { "modelAsString": false } }, "text": { "type": "string", "description": "The text content of the file." } }, "required": [ "type", "text" ] }, "FileSearchToolDefinition": { "type": "object", "description": "The input definition information for a file search tool as used to configure an agent.", "properties": { "file_search": { "$ref": "#/definitions/FileSearchToolDefinitionDetails", "description": "Options overrides for the file search tool.", "x-ms-client-name": "fileSearch" } }, "allOf": [ { "$ref": "#/definitions/ToolDefinition" } ], "x-ms-discriminator-value": "file_search" }, "FileSearchToolDefinitionDetails": { "type": "object", "description": "Options overrides for the file search tool.", "properties": { "max_num_results": { "type": "integer", "format": "int32", "description": "The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. See the file search tool documentation for more information.", "minimum": 1, "maximum": 50, "x-ms-client-name": "maxNumResults" }, "ranking_options": { "$ref": "#/definitions/FileSearchRankingOptions", "description": "Ranking options for file search.", "x-ms-client-name": "rankingOptions" } } }, "FileSearchToolResource": { "type": "object", "description": "A set of resources that are used by the `file_search` tool.", "properties": { "vector_store_ids": { "type": "array", "description": "The ID of the vector store attached to this agent. There can be a maximum of 1 vector\nstore attached to the agent.", "maxItems": 1, "items": { "type": "string" }, "x-ms-client-name": "vectorStoreIds" }, "vector_stores": { "type": "array", "description": "The list of vector store configuration objects from Azure.\nThis list is limited to one element.\nThe only element of this list contains the list of azure asset IDs used by the search tool.", "maxItems": 1, "items": { "$ref": "#/definitions/VectorStoreConfigurations" }, "x-ms-client-name": "vectorStores" } } }, "FileState": { "type": "string", "description": "The state of the file.", "enum": [ "uploaded", "pending", "running", "processed", "error", "deleting", "deleted" ], "x-ms-enum": { "name": "FileState", "modelAsString": true, "values": [ { "name": "uploaded", "value": "uploaded", "description": "The file has been uploaded but it's not yet processed. This state is not returned by Azure OpenAI and exposed only for\ncompatibility. It can be categorized as an inactive state." }, { "name": "pending", "value": "pending", "description": "The operation was created and is not queued to be processed in the future. It can be categorized as an inactive state." }, { "name": "running", "value": "running", "description": "The operation has started to be processed. It can be categorized as an active state." }, { "name": "processed", "value": "processed", "description": "The operation has successfully processed and is ready for consumption. It can be categorized as a terminal state." }, { "name": "error", "value": "error", "description": "The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state." }, { "name": "deleting", "value": "deleting", "description": "The entity is in the process to be deleted. This state is not returned by Azure OpenAI and exposed only for compatibility.\nIt can be categorized as an active state." }, { "name": "deleted", "value": "deleted", "description": "The entity has been deleted but may still be referenced by other entities predating the deletion. It can be categorized as a\nterminal state." } ] } }, "FunctionDefinition": { "type": "object", "description": "The input definition information for a function.", "properties": { "name": { "type": "string", "description": "The name of the function to be called." }, "description": { "type": "string", "description": "A description of what the function does, used by the model to choose when and how to call the function." }, "parameters": { "description": "The parameters the functions accepts, described as a JSON Schema object." } }, "required": [ "name", "parameters" ] }, "FunctionName": { "type": "object", "description": "The function name that will be used, if using the `function` tool", "properties": { "name": { "type": "string", "description": "The name of the function to call" } }, "required": [ "name" ] }, "FunctionToolDefinition": { "type": "object", "description": "The input definition information for a function tool as used to configure an agent.", "properties": { "function": { "$ref": "#/definitions/FunctionDefinition", "description": "The definition of the concrete function that the function tool should call." } }, "required": [ "function" ], "allOf": [ { "$ref": "#/definitions/ToolDefinition" } ], "x-ms-discriminator-value": "function" }, "ImageDetailLevel": { "type": "string", "description": "Specifies an image's detail level. Can be 'auto', 'low', 'high', or an unknown future value.", "enum": [ "auto", "low", "high" ], "x-ms-enum": { "name": "ImageDetailLevel", "modelAsString": true, "values": [ { "name": "auto", "value": "auto", "description": "Automatically select an appropriate detail level." }, { "name": "low", "value": "low", "description": "Use a lower detail level to reduce bandwidth or cost." }, { "name": "high", "value": "high", "description": "Use a higher detail level—potentially more resource-intensive." } ] } }, "IncompleteDetailsReason": { "type": "string", "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", "enum": [ "max_completion_tokens", "max_prompt_tokens" ], "x-ms-enum": { "name": "IncompleteDetailsReason", "modelAsString": true, "values": [ { "name": "maxCompletionTokens", "value": "max_completion_tokens", "description": "Maximum completion tokens exceeded" }, { "name": "maxPromptTokens", "value": "max_prompt_tokens", "description": "Maximum prompt tokens exceeded" } ] } }, "IncompleteRunDetails": { "type": "object", "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", "properties": { "reason": { "$ref": "#/definitions/IncompleteDetailsReason", "description": "The reason why the run is incomplete. This indicates which specific token limit was reached during the run." } }, "required": [ "reason" ] }, "IndexResource": { "type": "object", "description": "A Index resource.", "properties": { "index_connection_id": { "type": "string", "description": "An index connection id in an IndexResource attached to this agent.", "x-ms-client-name": "indexConnectionId" }, "index_name": { "type": "string", "description": "The name of an index in an IndexResource attached to this agent.", "x-ms-client-name": "indexName" } } }, "ListSortOrder": { "type": "string", "description": "The available sorting options when requesting a list of response objects.", "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." } ] } }, "MessageAttachment": { "type": "object", "description": "This describes to which tools a file has been attached.", "properties": { "file_id": { "type": "string", "description": "The ID of the file to attach to the message.", "x-ms-client-name": "fileId" }, "data_source": { "$ref": "#/definitions/VectorStoreDataSource", "description": "Azure asset ID.", "x-ms-client-name": "dataSource" }, "tools": { "type": "array", "description": "The tools to add to this file.", "items": { "$ref": "#/definitions/MessageAttachmentToolDefinition" } } }, "required": [ "tools" ] }, "MessageAttachmentToolDefinition": {}, "MessageBlockType": { "type": "string", "description": "Specifies the kind of content block within a message. Could be text, an image file, an external image URL, or an unknown future type.", "enum": [ "text", "image_file", "image_url" ], "x-ms-enum": { "name": "MessageBlockType", "modelAsString": true, "values": [ { "name": "text", "value": "text", "description": "Indicates a block containing text content." }, { "name": "image_file", "value": "image_file", "description": "Indicates a block referencing an internally uploaded image file." }, { "name": "image_url", "value": "image_url", "description": "Indicates a block referencing an external image URL." } ] } }, "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" ] }, "MessageDelta": { "type": "object", "description": "Represents the typed 'delta' payload within a streaming message delta chunk.", "properties": { "role": { "$ref": "#/definitions/MessageRole", "description": "The entity that produced the message." }, "content": { "type": "array", "description": "The content of the message as an array of text and/or images.", "items": { "$ref": "#/definitions/MessageDeltaContent" } } }, "required": [ "role", "content" ] }, "MessageDeltaChunk": { "type": "object", "description": "Represents a message delta i.e. any changed fields on a message during streaming.", "properties": { "id": { "type": "string", "description": "The identifier of the message, which can be referenced in API endpoints." }, "object": { "type": "string", "description": "The object type, which is always `thread.message.delta`.", "enum": [ "thread.message.delta" ], "x-ms-enum": { "modelAsString": false } }, "delta": { "$ref": "#/definitions/MessageDelta", "description": "The delta containing the fields that have changed on the Message." } }, "required": [ "id", "object", "delta" ] }, "MessageDeltaContent": { "type": "object", "description": "The abstract base representation of a partial streamed message content payload.", "properties": { "index": { "type": "integer", "format": "int32", "description": "The index of the content part of the message." }, "type": { "type": "string", "description": "The type of content for this content part." } }, "discriminator": "type", "required": [ "index", "type" ] }, "MessageDeltaImageFileContent": { "type": "object", "description": "Represents a streamed image file content part within a streaming message delta chunk.", "properties": { "image_file": { "$ref": "#/definitions/MessageDeltaImageFileContentObject", "description": "The image_file data.", "x-ms-client-name": "imageFile" } }, "allOf": [ { "$ref": "#/definitions/MessageDeltaContent" } ], "x-ms-discriminator-value": "image_file" }, "MessageDeltaImageFileContentObject": { "type": "object", "description": "Represents the 'image_file' payload within streaming image file content.", "properties": { "file_id": { "type": "string", "description": "The file ID of the image in the message content.", "x-ms-client-name": "fileId" } } }, "MessageDeltaTextAnnotation": { "type": "object", "description": "The abstract base representation of a streamed text content part's text annotation.", "properties": { "index": { "type": "integer", "format": "int32", "description": "The index of the annotation within a text content part." }, "type": { "type": "string", "description": "The type of the text content annotation." } }, "discriminator": "type", "required": [ "index", "type" ] }, "MessageDeltaTextContent": { "type": "object", "description": "Represents a streamed text content part within a streaming message delta chunk.", "properties": { "text": { "$ref": "#/definitions/MessageDeltaTextContentObject", "description": "The text content details." } }, "allOf": [ { "$ref": "#/definitions/MessageDeltaContent" } ], "x-ms-discriminator-value": "text" }, "MessageDeltaTextContentObject": { "type": "object", "description": "Represents the data of a streamed text content part within a streaming message delta chunk.", "properties": { "value": { "type": "string", "description": "The data that makes up the text." }, "annotations": { "type": "array", "description": "Annotations for the text.", "items": { "$ref": "#/definitions/MessageDeltaTextAnnotation" } } } }, "MessageDeltaTextFileCitationAnnotation": { "type": "object", "description": "Represents a streamed file citation applied to a streaming text content part.", "properties": { "file_citation": { "$ref": "#/definitions/MessageDeltaTextFileCitationAnnotationObject", "description": "The file citation information.", "x-ms-client-name": "fileCitation" }, "text": { "type": "string", "description": "The text in the message content that needs to be replaced" }, "start_index": { "type": "integer", "format": "int32", "description": "The start index of this annotation in the content text.", "x-ms-client-name": "startIndex" }, "end_index": { "type": "integer", "format": "int32", "description": "The end index of this annotation in the content text.", "x-ms-client-name": "endIndex" } }, "allOf": [ { "$ref": "#/definitions/MessageDeltaTextAnnotation" } ], "x-ms-discriminator-value": "file_citation" }, "MessageDeltaTextFileCitationAnnotationObject": { "type": "object", "description": "Represents the data of a streamed file citation as applied to a streaming text content part.", "properties": { "file_id": { "type": "string", "description": "The ID of the specific file the citation is from.", "x-ms-client-name": "fileId" }, "quote": { "type": "string", "description": "The specific quote in the cited file." } } }, "MessageDeltaTextFilePathAnnotation": { "type": "object", "description": "Represents a streamed file path annotation applied to a streaming text content part.", "properties": { "file_path": { "$ref": "#/definitions/MessageDeltaTextFilePathAnnotationObject", "description": "The file path information.", "x-ms-client-name": "filePath" }, "start_index": { "type": "integer", "format": "int32", "description": "The start index of this annotation in the content text.", "x-ms-client-name": "startIndex" }, "end_index": { "type": "integer", "format": "int32", "description": "The end index of this annotation in the content text.", "x-ms-client-name": "endIndex" }, "text": { "type": "string", "description": "The text in the message content that needs to be replaced" } }, "allOf": [ { "$ref": "#/definitions/MessageDeltaTextAnnotation" } ], "x-ms-discriminator-value": "file_path" }, "MessageDeltaTextFilePathAnnotationObject": { "type": "object", "description": "Represents the data of a streamed file path annotation as applied to a streaming text content part.", "properties": { "file_id": { "type": "string", "description": "The file ID for the annotation.", "x-ms-client-name": "fileId" } } }, "MessageDeltaTextUrlCitationAnnotation": { "type": "object", "description": "A citation within the message that points to a specific URL associated with the message. Generated when the agent uses tools such as 'bing_grounding' to search the Internet.", "properties": { "url_citation": { "$ref": "#/definitions/MessageDeltaTextUrlCitationDetails", "description": "The details of the URL citation.", "x-ms-client-name": "urlCitation" }, "start_index": { "type": "integer", "format": "int32", "description": "The first text index associated with this text annotation.", "x-ms-client-name": "startIndex" }, "end_index": { "type": "integer", "format": "int32", "description": "The last text index associated with this text annotation.", "x-ms-client-name": "endIndex" } }, "required": [ "url_citation" ], "allOf": [ { "$ref": "#/definitions/MessageDeltaTextAnnotation" } ], "x-ms-discriminator-value": "url_citation" }, "MessageDeltaTextUrlCitationDetails": { "type": "object", "description": "A representation of a URL citation, as used in text thread message content.", "properties": { "url": { "type": "string", "description": "The URL associated with this citation." }, "title": { "type": "string", "description": "The title of the URL." } }, "required": [ "url" ] }, "MessageImageFileContent": { "type": "object", "description": "A representation of image file content in a thread message.", "properties": { "image_file": { "$ref": "#/definitions/MessageImageFileDetails", "description": "The image file for this thread message content item.", "x-ms-client-name": "imageFile" } }, "required": [ "image_file" ], "allOf": [ { "$ref": "#/definitions/MessageContent" } ], "x-ms-discriminator-value": "image_file" }, "MessageImageFileDetails": { "type": "object", "description": "An image reference, as represented in thread message content.", "properties": { "file_id": { "type": "string", "description": "The ID for the file associated with this image.", "x-ms-client-name": "fileId" } }, "required": [ "file_id" ] }, "MessageImageFileParam": { "type": "object", "description": "Defines how an internally uploaded image file is referenced when creating an image-file block.", "properties": { "file_id": { "type": "string", "description": "The ID of the previously uploaded image file.", "x-ms-client-name": "fileId" }, "detail": { "$ref": "#/definitions/ImageDetailLevel", "description": "Optional detail level for the image (auto, low, or high)." } }, "required": [ "file_id" ] }, "MessageImageUrlParam": { "type": "object", "description": "Defines how an external image URL is referenced when creating an image-URL block.", "properties": { "url": { "type": "string", "description": "The publicly accessible URL of the external image." }, "detail": { "$ref": "#/definitions/ImageDetailLevel", "description": "Optional detail level for the image (auto, low, or high). Defaults to 'auto' if not specified." } }, "required": [ "url" ] }, "MessageIncompleteDetails": { "type": "object", "description": "Information providing additional detail about a message entering an incomplete status.", "properties": { "reason": { "$ref": "#/definitions/MessageIncompleteDetailsReason", "description": "The provided reason describing why the message was marked as incomplete." } }, "required": [ "reason" ] }, "MessageIncompleteDetailsReason": { "type": "string", "description": "A set of reasons describing why a message is marked as incomplete.", "enum": [ "content_filter", "max_tokens", "run_cancelled", "run_failed", "run_expired" ], "x-ms-enum": { "name": "MessageIncompleteDetailsReason", "modelAsString": true, "values": [ { "name": "contentFilter", "value": "content_filter", "description": "The run generating the message was terminated due to content filter flagging." }, { "name": "maxTokens", "value": "max_tokens", "description": "The run generating the message exhausted available tokens before completion." }, { "name": "runCancelled", "value": "run_cancelled", "description": "The run generating the message was cancelled before completion." }, { "name": "runFailed", "value": "run_failed", "description": "The run generating the message failed." }, { "name": "runExpired", "value": "run_expired", "description": "The run generating the message expired." } ] } }, "MessageInputContent": {}, "MessageInputContentBlock": { "type": "object", "description": "Defines a single content block when creating a message. The 'type' field determines whether it is text, an image file, or an external image URL, etc.", "properties": { "type": { "$ref": "#/definitions/MessageBlockType", "description": "Specifies which kind of content block this is (text, image_file, image_url, etc.)." } }, "discriminator": "type", "required": [ "type" ] }, "MessageInputImageFileBlock": { "type": "object", "description": "An image-file block in a new message, referencing an internally uploaded image by file ID.", "properties": { "image_file": { "$ref": "#/definitions/MessageImageFileParam", "description": "Information about the referenced image file, including file ID and optional detail level.", "x-ms-client-name": "imageFile" } }, "required": [ "image_file" ], "allOf": [ { "$ref": "#/definitions/MessageInputContentBlock" } ], "x-ms-discriminator-value": "image_file" }, "MessageInputImageUrlBlock": { "type": "object", "description": "An image-URL block in a new message, referencing an external image by URL.", "properties": { "image_url": { "$ref": "#/definitions/MessageImageUrlParam", "description": "Information about the external image URL, including the URL and optional detail level.", "x-ms-client-name": "imageUrl" } }, "required": [ "image_url" ], "allOf": [ { "$ref": "#/definitions/MessageInputContentBlock" } ], "x-ms-discriminator-value": "image_url" }, "MessageInputTextBlock": { "type": "object", "description": "A text block in a new message, containing plain text content.", "properties": { "text": { "type": "string", "description": "The plain text content for this block." } }, "required": [ "text" ], "allOf": [ { "$ref": "#/definitions/MessageInputContentBlock" } ], "x-ms-discriminator-value": "text" }, "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": "agent", "value": "assistant", "description": "The role representing the agent." } ] } }, "MessageStatus": { "type": "string", "description": "The possible execution status values for a thread message.", "enum": [ "in_progress", "incomplete", "completed" ], "x-ms-enum": { "name": "MessageStatus", "modelAsString": true, "values": [ { "name": "inProgress", "value": "in_progress", "description": "A run is currently creating this message." }, { "name": "incomplete", "value": "incomplete", "description": "This message is incomplete. See incomplete_details for more information." }, { "name": "completed", "value": "completed", "description": "This message was successfully completed by a run." } ] } }, "MessageStreamEvent": { "type": "string", "description": "Message operation related streaming events", "enum": [ "thread.message.created", "thread.message.in_progress", "thread.message.delta", "thread.message.completed", "thread.message.incomplete" ], "x-ms-enum": { "name": "MessageStreamEvent", "modelAsString": true, "values": [ { "name": "ThreadMessageCreated", "value": "thread.message.created", "description": "Event sent when a new message is created. The data of this event is of type ThreadMessage" }, { "name": "ThreadMessageInProgress", "value": "thread.message.in_progress", "description": "Event sent when a message moves to `in_progress` status. The data of this event is of type ThreadMessage" }, { "name": "ThreadMessageDelta", "value": "thread.message.delta", "description": "Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk" }, { "name": "ThreadMessageCompleted", "value": "thread.message.completed", "description": "Event sent when a message is completed. The data of this event is of type ThreadMessage" }, { "name": "ThreadMessageIncomplete", "value": "thread.message.incomplete", "description": "Event sent before a message is completed. The data of this event is of type ThreadMessage" } ] } }, "MessageTextAnnotation": { "type": "object", "description": "An abstract representation of an annotation to text thread message content.", "properties": { "type": { "type": "string", "description": "The object type." }, "text": { "type": "string", "description": "The textual content associated with this text annotation item." } }, "discriminator": "type", "required": [ "type", "text" ] }, "MessageTextContent": { "type": "object", "description": "A representation of a textual item of thread message content.", "properties": { "text": { "$ref": "#/definitions/MessageTextDetails", "description": "The text and associated annotations for this thread message content item." } }, "required": [ "text" ], "allOf": [ { "$ref": "#/definitions/MessageContent" } ], "x-ms-discriminator-value": "text" }, "MessageTextDetails": { "type": "object", "description": "The text and associated annotations for a single item of agent thread message content.", "properties": { "value": { "type": "string", "description": "The text data." }, "annotations": { "type": "array", "description": "A list of annotations associated with this text.", "items": { "$ref": "#/definitions/MessageTextAnnotation" } } }, "required": [ "value", "annotations" ] }, "MessageTextFileCitationAnnotation": { "type": "object", "description": "A citation within the message that points to a specific quote from a specific File associated with the agent or the message. Generated when the agent uses the 'file_search' tool to search files.", "properties": { "file_citation": { "$ref": "#/definitions/MessageTextFileCitationDetails", "description": "A citation within the message that points to a specific quote from a specific file.\nGenerated when the agent uses the \"file_search\" tool to search files.", "x-ms-client-name": "fileCitation" }, "start_index": { "type": "integer", "format": "int32", "description": "The first text index associated with this text annotation.", "x-ms-client-name": "startIndex" }, "end_index": { "type": "integer", "format": "int32", "description": "The last text index associated with this text annotation.", "x-ms-client-name": "endIndex" } }, "required": [ "file_citation" ], "allOf": [ { "$ref": "#/definitions/MessageTextAnnotation" } ], "x-ms-discriminator-value": "file_citation" }, "MessageTextFileCitationDetails": { "type": "object", "description": "A representation of a file-based text citation, as used in a file-based annotation of text thread message content.", "properties": { "file_id": { "type": "string", "description": "The ID of the file associated with this citation.", "x-ms-client-name": "fileId" }, "quote": { "type": "string", "description": "The specific quote cited in the associated file." } }, "required": [ "file_id", "quote" ] }, "MessageTextFilePathAnnotation": { "type": "object", "description": "A citation within the message that points to a file located at a specific path.", "properties": { "file_path": { "$ref": "#/definitions/MessageTextFilePathDetails", "description": "A URL for the file that's generated when the agent used the code_interpreter tool to generate a file.", "x-ms-client-name": "filePath" }, "start_index": { "type": "integer", "format": "int32", "description": "The first text index associated with this text annotation.", "x-ms-client-name": "startIndex" }, "end_index": { "type": "integer", "format": "int32", "description": "The last text index associated with this text annotation.", "x-ms-client-name": "endIndex" } }, "required": [ "file_path" ], "allOf": [ { "$ref": "#/definitions/MessageTextAnnotation" } ], "x-ms-discriminator-value": "file_path" }, "MessageTextFilePathDetails": { "type": "object", "description": "An encapsulation of an image file ID, as used by message image content.", "properties": { "file_id": { "type": "string", "description": "The ID of the specific file that the citation is from.", "x-ms-client-name": "fileId" } }, "required": [ "file_id" ] }, "MessageTextUrlCitationAnnotation": { "type": "object", "description": "A citation within the message that points to a specific URL associated with the message. Generated when the agent uses tools such as 'bing_grounding' to search the Internet.", "properties": { "url_citation": { "$ref": "#/definitions/MessageTextUrlCitationDetails", "description": "The details of the URL citation.", "x-ms-client-name": "urlCitation" }, "start_index": { "type": "integer", "format": "int32", "description": "The first text index associated with this text annotation.", "x-ms-client-name": "startIndex" }, "end_index": { "type": "integer", "format": "int32", "description": "The last text index associated with this text annotation.", "x-ms-client-name": "endIndex" } }, "required": [ "url_citation" ], "allOf": [ { "$ref": "#/definitions/MessageTextAnnotation" } ], "x-ms-discriminator-value": "url_citation" }, "MessageTextUrlCitationDetails": { "type": "object", "description": "A representation of a URL citation, as used in text thread message content.", "properties": { "url": { "type": "string", "description": "The URL associated with this citation." }, "title": { "type": "string", "description": "The title of the URL." } }, "required": [ "url" ] }, "OpenApiAnonymousAuthDetails": { "type": "object", "description": "Security details for OpenApi anonymous authentication", "allOf": [ { "$ref": "#/definitions/OpenApiAuthDetails" } ], "x-ms-discriminator-value": "anonymous" }, "OpenApiAuthDetails": { "type": "object", "description": "authentication details for OpenApiFunctionDefinition", "properties": { "type": { "$ref": "#/definitions/OpenApiAuthType", "description": "The type of authentication, must be anonymous/connection/managed_identity" } }, "discriminator": "type", "required": [ "type" ] }, "OpenApiAuthType": { "type": "string", "description": " Authentication type for OpenApi endpoint. Allowed types are:\n - Anonymous (no authentication required)\n - Connection (requires connection_id to endpoint, as setup in AI Foundry)\n - Managed_Identity (requires audience for identity based auth)", "enum": [ "anonymous", "connection", "managed_identity" ], "x-ms-enum": { "name": "OpenApiAuthType", "modelAsString": true, "values": [ { "name": "anonymous", "value": "anonymous" }, { "name": "connection", "value": "connection" }, { "name": "managedIdentity", "value": "managed_identity" } ] } }, "OpenApiConnectionAuthDetails": { "type": "object", "description": "Security details for OpenApi connection authentication", "properties": { "security_scheme": { "$ref": "#/definitions/OpenApiConnectionSecurityScheme", "description": "Connection auth security details" } }, "required": [ "security_scheme" ], "allOf": [ { "$ref": "#/definitions/OpenApiAuthDetails" } ], "x-ms-discriminator-value": "connection" }, "OpenApiConnectionSecurityScheme": { "type": "object", "description": "Security scheme for OpenApi managed_identity authentication", "properties": { "connection_id": { "type": "string", "description": "Connection id for Connection auth type" } }, "required": [ "connection_id" ] }, "OpenApiFunctionDefinition": { "type": "object", "description": "The input definition information for an openapi function.", "properties": { "name": { "type": "string", "description": "The name of the function to be called." }, "description": { "type": "string", "description": "A description of what the function does, used by the model to choose when and how to call the function." }, "spec": { "description": "The openapi function shape, described as a JSON Schema object." }, "auth": { "$ref": "#/definitions/OpenApiAuthDetails", "description": "Open API authentication details" }, "default_params": { "type": "array", "description": "List of OpenAPI spec parameters that will use user-provided defaults", "items": { "type": "string" }, "x-ms-client-name": "defaultParams" }, "functions": { "type": "array", "description": "List of function definitions used by OpenApi tool", "items": { "$ref": "#/definitions/FunctionDefinition" }, "readOnly": true } }, "required": [ "name", "spec", "auth" ] }, "OpenApiManagedAuthDetails": { "type": "object", "description": "Security details for OpenApi managed_identity authentication", "properties": { "security_scheme": { "$ref": "#/definitions/OpenApiManagedSecurityScheme", "description": "Connection auth security details" } }, "required": [ "security_scheme" ], "allOf": [ { "$ref": "#/definitions/OpenApiAuthDetails" } ], "x-ms-discriminator-value": "managed_identity" }, "OpenApiManagedSecurityScheme": { "type": "object", "description": "Security scheme for OpenApi managed_identity authentication", "properties": { "audience": { "type": "string", "description": "Authentication scope for managed_identity auth type" } }, "required": [ "audience" ] }, "OpenApiToolDefinition": { "type": "object", "description": "The input definition information for an OpenAPI tool as used to configure an agent.", "properties": { "openapi": { "$ref": "#/definitions/OpenApiFunctionDefinition", "description": "The openapi function definition." } }, "required": [ "openapi" ], "allOf": [ { "$ref": "#/definitions/ToolDefinition" } ], "x-ms-discriminator-value": "openapi" }, "RequiredAction": { "type": "object", "description": "An abstract representation of a required action for an agent thread run to continue.", "properties": { "type": { "type": "string", "description": "The object type." } }, "discriminator": "type", "required": [ "type" ] }, "RequiredFunctionToolCall": { "type": "object", "description": "A representation of a requested call to a function tool, needed by the model to continue evaluation of a run.", "properties": { "function": { "$ref": "#/definitions/RequiredFunctionToolCallDetails", "description": "Detailed information about the function to be executed by the tool that includes name and arguments." } }, "required": [ "function" ], "allOf": [ { "$ref": "#/definitions/RequiredToolCall" } ], "x-ms-discriminator-value": "function" }, "RequiredFunctionToolCallDetails": { "type": "object", "description": "The detailed information for a function invocation, as provided by a required action invoking a function tool, that includes the name of and arguments to the function.", "properties": { "name": { "type": "string", "description": "The name of the function." }, "arguments": { "type": "string", "description": "The arguments to use when invoking the named function, as provided by the model. Arguments are presented as a JSON document that should be validated and parsed for evaluation." } }, "required": [ "name", "arguments" ] }, "RequiredToolCall": { "type": "object", "description": "An abstract representation of a tool invocation needed by the model to continue a run.", "properties": { "type": { "type": "string", "description": "The object type for the required tool call." }, "id": { "type": "string", "description": "The ID of the tool call. This ID must be referenced when submitting tool outputs." } }, "discriminator": "type", "required": [ "type", "id" ] }, "ResponseFormat": { "type": "string", "description": "Possible API response formats.", "enum": [ "text", "json_object" ], "x-ms-enum": { "name": "ResponseFormat", "modelAsString": true, "values": [ { "name": "text", "value": "text", "description": "`text` format should be used for requests involving any sort of ToolCall." }, { "name": "jsonObject", "value": "json_object", "description": "Using `json_object` format will limit the usage of ToolCall to only functions." } ] } }, "ResponseFormatJsonSchema": { "type": "object", "description": "A description of what the response format is for, used by the model to determine how to respond in the format.", "properties": { "description": { "type": "string", "description": "A description of what the response format is for, used by the model to determine how to respond in the format." }, "name": { "type": "string", "description": "The name of a schema." }, "schema": { "description": "The JSON schema object, describing the response format." } }, "required": [ "name", "schema" ] }, "ResponseFormatJsonSchemaType": { "type": "object", "description": "The type of response format being defined: `json_schema`", "properties": { "type": { "type": "string", "description": "Type", "enum": [ "json_schema" ], "x-ms-enum": { "modelAsString": false } }, "json_schema": { "$ref": "#/definitions/ResponseFormatJsonSchema", "description": "The JSON schema, describing response format.", "x-ms-client-name": "jsonSchema" } }, "required": [ "type", "json_schema" ] }, "RunAdditionalFieldList": { "type": "string", "description": "A list of additional fields to include in the response.", "enum": [ "step_details.tool_calls[*].file_search.results[*].content" ], "x-ms-enum": { "name": "RunAdditionalFieldList", "modelAsString": true, "values": [ { "name": "FileSearchContents", "value": "step_details.tool_calls[*].file_search.results[*].content", "description": "File search result content." } ] } }, "RunCompletionUsage": { "type": "object", "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", "properties": { "completion_tokens": { "type": "integer", "format": "int64", "description": "Number of completion tokens used over the course of the run.", "x-ms-client-name": "completionTokens" }, "prompt_tokens": { "type": "integer", "format": "int64", "description": "Number of prompt tokens used over the course of the run.", "x-ms-client-name": "promptTokens" }, "total_tokens": { "type": "integer", "format": "int64", "description": "Total number of tokens used (prompt + completion).", "x-ms-client-name": "totalTokens" } }, "required": [ "completion_tokens", "prompt_tokens", "total_tokens" ] }, "RunError": { "type": "object", "description": "The details of an error as encountered by an agent 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" ] }, "RunStatus": { "type": "string", "description": "Possible values for the status of an agent 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." } ] } }, "RunStep": { "type": "object", "description": "Detailed information about a single step of an agent 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 agent 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": { "$ref": "#/definitions/RunStepError", "description": "If applicable, information about the last error encountered by this run step.", "x-nullable": true, "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": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this item expired.", "x-nullable": true, "x-ms-client-name": "expiredAt" }, "completed_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this completed.", "x-nullable": true, "x-ms-client-name": "completedAt" }, "cancelled_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this was cancelled.", "x-nullable": true, "x-ms-client-name": "cancelledAt" }, "failed_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this failed.", "x-nullable": true, "x-ms-client-name": "failedAt" }, "usage": { "$ref": "#/definitions/RunStepCompletionUsage", "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", "x-nullable": true }, "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" ] }, "RunStepAzureAISearchToolCall": { "type": "object", "description": "A record of a call to an Azure AI Search tool, issued by the model in evaluation of a defined tool, that represents\nexecuted Azure AI search.", "properties": { "azure_ai_search": { "type": "object", "description": "Reserved for future use.", "additionalProperties": { "type": "string" }, "x-ms-client-name": "azureAISearch" } }, "required": [ "azure_ai_search" ], "allOf": [ { "$ref": "#/definitions/RunStepToolCall" } ], "x-ms-discriminator-value": "azure_ai_search" }, "RunStepBingGroundingToolCall": { "type": "object", "description": "A record of a call to a bing grounding tool, issued by the model in evaluation of a defined tool, that represents\nexecuted search with bing grounding.", "properties": { "bing_grounding": { "type": "object", "description": "The dictionary with request and response from Bing Grounding search tool.", "additionalProperties": { "type": "string" }, "x-ms-client-name": "bingGrounding" } }, "required": [ "bing_grounding" ], "allOf": [ { "$ref": "#/definitions/RunStepToolCall" } ], "x-ms-discriminator-value": "bing_grounding" }, "RunStepCodeInterpreterImageOutput": { "type": "object", "description": "A representation of an image output emitted by a code interpreter tool in response to a tool call by the model.", "properties": { "image": { "$ref": "#/definitions/RunStepCodeInterpreterImageReference", "description": "Referential information for the image associated with this output." } }, "required": [ "image" ], "allOf": [ { "$ref": "#/definitions/RunStepCodeInterpreterToolCallOutput" } ], "x-ms-discriminator-value": "image" }, "RunStepCodeInterpreterImageReference": { "type": "object", "description": "An image reference emitted by a code interpreter tool in response to a tool call by the model.", "properties": { "file_id": { "type": "string", "description": "The ID of the file associated with this image.", "x-ms-client-name": "fileId" } }, "required": [ "file_id" ] }, "RunStepCodeInterpreterLogOutput": { "type": "object", "description": "A representation of a log output emitted by a code interpreter tool in response to a tool call by the model.", "properties": { "logs": { "type": "string", "description": "The serialized log output emitted by the code interpreter." } }, "required": [ "logs" ], "allOf": [ { "$ref": "#/definitions/RunStepCodeInterpreterToolCallOutput" } ], "x-ms-discriminator-value": "logs" }, "RunStepCodeInterpreterToolCall": { "type": "object", "description": "A record of a call to a code interpreter tool, issued by the model in evaluation of a defined tool, that\nrepresents inputs and outputs consumed and emitted by the code interpreter.", "properties": { "code_interpreter": { "$ref": "#/definitions/RunStepCodeInterpreterToolCallDetails", "description": "The details of the tool call to the code interpreter tool.", "x-ms-client-name": "codeInterpreter" } }, "required": [ "code_interpreter" ], "allOf": [ { "$ref": "#/definitions/RunStepToolCall" } ], "x-ms-discriminator-value": "code_interpreter" }, "RunStepCodeInterpreterToolCallDetails": { "type": "object", "description": "The detailed information about a code interpreter invocation by the model.", "properties": { "input": { "type": "string", "description": "The input provided by the model to the code interpreter tool." }, "outputs": { "type": "array", "description": "The outputs produced by the code interpreter tool back to the model in response to the tool call.", "items": { "$ref": "#/definitions/RunStepCodeInterpreterToolCallOutput" } } }, "required": [ "input", "outputs" ] }, "RunStepCodeInterpreterToolCallOutput": { "type": "object", "description": "An abstract representation of an emitted output from a code interpreter tool.", "properties": { "type": { "type": "string", "description": "The object type." } }, "discriminator": "type", "required": [ "type" ] }, "RunStepCompletionUsage": { "type": "object", "description": "Usage statistics related to the run step.", "properties": { "completion_tokens": { "type": "integer", "format": "int64", "description": "Number of completion tokens used over the course of the run step.", "x-ms-client-name": "completionTokens" }, "prompt_tokens": { "type": "integer", "format": "int64", "description": "Number of prompt tokens used over the course of the run step.", "x-ms-client-name": "promptTokens" }, "total_tokens": { "type": "integer", "format": "int64", "description": "Total number of tokens used (prompt + completion).", "x-ms-client-name": "totalTokens" } }, "required": [ "completion_tokens", "prompt_tokens", "total_tokens" ] }, "RunStepDelta": { "type": "object", "description": "Represents the delta payload in a streaming run step delta chunk.", "properties": { "step_details": { "$ref": "#/definitions/RunStepDeltaDetail", "description": "The details of the run step.", "x-ms-client-name": "stepDetails" } } }, "RunStepDeltaChunk": { "type": "object", "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.", "properties": { "id": { "type": "string", "description": "The identifier of the run step, which can be referenced in API endpoints." }, "object": { "type": "string", "description": "The object type, which is always `thread.run.step.delta`.", "enum": [ "thread.run.step.delta" ], "x-ms-enum": { "modelAsString": false } }, "delta": { "$ref": "#/definitions/RunStepDelta", "description": "The delta containing the fields that have changed on the run step." } }, "required": [ "id", "object", "delta" ] }, "RunStepDeltaCodeInterpreterDetailItemObject": { "type": "object", "description": "Represents the Code Interpreter tool call data in a streaming run step's tool calls.", "properties": { "input": { "type": "string", "description": "The input into the Code Interpreter tool call." }, "outputs": { "type": "array", "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more\nitems, including text (`logs`) or images (`image`). Each of these are represented by a\ndifferent object type.", "items": { "$ref": "#/definitions/RunStepDeltaCodeInterpreterOutput" } } } }, "RunStepDeltaCodeInterpreterImageOutput": { "type": "object", "description": "Represents an image output as produced the Code interpreter tool and as represented in a streaming run step's delta tool calls collection.", "properties": { "image": { "$ref": "#/definitions/RunStepDeltaCodeInterpreterImageOutputObject", "description": "The image data for the Code Interpreter tool call output." } }, "allOf": [ { "$ref": "#/definitions/RunStepDeltaCodeInterpreterOutput" } ], "x-ms-discriminator-value": "image" }, "RunStepDeltaCodeInterpreterImageOutputObject": { "type": "object", "description": "Represents the data for a streaming run step's Code Interpreter tool call image output.", "properties": { "file_id": { "type": "string", "description": "The file ID for the image.", "x-ms-client-name": "fileId" } } }, "RunStepDeltaCodeInterpreterLogOutput": { "type": "object", "description": "Represents a log output as produced by the Code Interpreter tool and as represented in a streaming run step's delta tool calls collection.", "properties": { "logs": { "type": "string", "description": "The text output from the Code Interpreter tool call." } }, "allOf": [ { "$ref": "#/definitions/RunStepDeltaCodeInterpreterOutput" } ], "x-ms-discriminator-value": "logs" }, "RunStepDeltaCodeInterpreterOutput": { "type": "object", "description": "The abstract base representation of a streaming run step tool call's Code Interpreter tool output.", "properties": { "index": { "type": "integer", "format": "int32", "description": "The index of the output in the streaming run step tool call's Code Interpreter outputs array." }, "type": { "type": "string", "description": "The type of the streaming run step tool call's Code Interpreter output." } }, "discriminator": "type", "required": [ "index", "type" ] }, "RunStepDeltaCodeInterpreterToolCall": { "type": "object", "description": "Represents a Code Interpreter tool call within a streaming run step's tool call details.", "properties": { "code_interpreter": { "$ref": "#/definitions/RunStepDeltaCodeInterpreterDetailItemObject", "description": "The Code Interpreter data for the tool call.", "x-ms-client-name": "codeInterpreter" } }, "allOf": [ { "$ref": "#/definitions/RunStepDeltaToolCall" } ], "x-ms-discriminator-value": "code_interpreter" }, "RunStepDeltaDetail": { "type": "object", "description": "Represents a single run step detail item in a streaming run step's delta payload.", "properties": { "type": { "type": "string", "description": "The object type for the run step detail object." } }, "discriminator": "type", "required": [ "type" ] }, "RunStepDeltaFileSearchToolCall": { "type": "object", "description": "Represents a file search tool call within a streaming run step's tool call details.", "properties": { "file_search": { "$ref": "#/definitions/RunStepFileSearchToolCallResults", "description": "Reserved for future use.", "x-ms-client-name": "fileSearch" } }, "allOf": [ { "$ref": "#/definitions/RunStepDeltaToolCall" } ], "x-ms-discriminator-value": "file_search" }, "RunStepDeltaFunction": { "type": "object", "description": "Represents the function data in a streaming run step delta's function tool call.", "properties": { "name": { "type": "string", "description": "The name of the function." }, "arguments": { "type": "string", "description": "The arguments passed to the function as input." }, "output": { "type": "string", "description": "The output of the function, null if outputs have not yet been submitted.", "x-nullable": true } } }, "RunStepDeltaFunctionToolCall": { "type": "object", "description": "Represents a function tool call within a streaming run step's tool call details.", "properties": { "function": { "$ref": "#/definitions/RunStepDeltaFunction", "description": "The function data for the tool call." } }, "allOf": [ { "$ref": "#/definitions/RunStepDeltaToolCall" } ], "x-ms-discriminator-value": "function" }, "RunStepDeltaMessageCreation": { "type": "object", "description": "Represents a message creation within a streaming run step delta.", "properties": { "message_creation": { "$ref": "#/definitions/RunStepDeltaMessageCreationObject", "description": "The message creation data.", "x-ms-client-name": "messageCreation" } }, "allOf": [ { "$ref": "#/definitions/RunStepDeltaDetail" } ], "x-ms-discriminator-value": "message_creation" }, "RunStepDeltaMessageCreationObject": { "type": "object", "description": "Represents the data within a streaming run step message creation response object.", "properties": { "message_id": { "type": "string", "description": "The ID of the newly-created message.", "x-ms-client-name": "messageId" } } }, "RunStepDeltaToolCall": { "type": "object", "description": "The abstract base representation of a single tool call within a streaming run step's delta tool call details.", "properties": { "index": { "type": "integer", "format": "int32", "description": "The index of the tool call detail in the run step's tool_calls array." }, "id": { "type": "string", "description": "The ID of the tool call, used when submitting outputs to the run." }, "type": { "type": "string", "description": "The type of the tool call detail item in a streaming run step's details." } }, "discriminator": "type", "required": [ "index", "id", "type" ] }, "RunStepDeltaToolCallObject": { "type": "object", "description": "Represents an invocation of tool calls as part of a streaming run step.", "properties": { "tool_calls": { "type": "array", "description": "The collection of tool calls for the tool call detail item.", "items": { "$ref": "#/definitions/RunStepDeltaToolCall" }, "x-ms-client-name": "toolCalls" } }, "allOf": [ { "$ref": "#/definitions/RunStepDeltaDetail" } ], "x-ms-discriminator-value": "tool_calls" }, "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" ] }, "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" ] }, "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." } ] } }, "RunStepFileSearchToolCall": { "type": "object", "description": "A record of a call to a file search tool, issued by the model in evaluation of a defined tool, that represents\nexecuted file search.", "properties": { "id": { "type": "string", "description": "The ID of the tool call. This ID must be referenced when you submit tool outputs." }, "file_search": { "$ref": "#/definitions/RunStepFileSearchToolCallResults", "description": "For now, this is always going to be an empty object.", "x-ms-client-name": "fileSearch" } }, "required": [ "id", "file_search" ], "allOf": [ { "$ref": "#/definitions/RunStepToolCall" } ], "x-ms-discriminator-value": "file_search" }, "RunStepFileSearchToolCallResult": { "type": "object", "description": " File search tool call result.", "properties": { "file_id": { "type": "string", "description": "The ID of the file that result was found in.", "x-ms-client-name": "fileId" }, "file_name": { "type": "string", "description": "The name of the file that result was found in.", "x-ms-client-name": "fileName" }, "score": { "type": "number", "format": "float", "description": "The score of the result. All values must be a floating point number between 0 and 1.", "minimum": 0, "maximum": 1 }, "content": { "type": "array", "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", "items": { "$ref": "#/definitions/FileSearchToolCallContent" } } }, "required": [ "file_id", "file_name", "score" ] }, "RunStepFileSearchToolCallResults": { "type": "object", "description": "The results of the file search.", "properties": { "ranking_options": { "$ref": "#/definitions/FileSearchRankingOptions", "description": "Ranking options for file search.", "x-ms-client-name": "rankingOptions" }, "results": { "type": "array", "description": "The array of a file search results", "items": { "$ref": "#/definitions/RunStepFileSearchToolCallResult" } } }, "required": [ "results" ] }, "RunStepFunctionToolCall": { "type": "object", "description": "A record of a call to a function tool, issued by the model in evaluation of a defined tool, that represents the inputs\nand output consumed and emitted by the specified function.", "properties": { "function": { "$ref": "#/definitions/RunStepFunctionToolCallDetails", "description": "The detailed information about the function called by the model." } }, "required": [ "function" ], "allOf": [ { "$ref": "#/definitions/RunStepToolCall" } ], "x-ms-discriminator-value": "function" }, "RunStepFunctionToolCallDetails": { "type": "object", "description": "The detailed information about the function called by the model.", "properties": { "name": { "type": "string", "description": "The name of the function." }, "arguments": { "type": "string", "description": "The arguments that the model requires are provided to the named function." } }, "required": [ "name", "arguments" ] }, "RunStepMessageCreationDetails": { "type": "object", "description": "The detailed information associated with a message creation run step.", "properties": { "message_creation": { "$ref": "#/definitions/RunStepMessageCreationReference", "description": "Information about the message creation associated with this run step.", "x-ms-client-name": "messageCreation" } }, "required": [ "message_creation" ], "allOf": [ { "$ref": "#/definitions/RunStepDetails" } ], "x-ms-discriminator-value": "message_creation" }, "RunStepMessageCreationReference": { "type": "object", "description": "The details of a message created as a part of a run step.", "properties": { "message_id": { "type": "string", "description": "The ID of the message created by this run step.", "x-ms-client-name": "messageId" } }, "required": [ "message_id" ] }, "RunStepOpenAPIToolCall": { "type": "object", "description": "A record of a call to an OpenAPI tool, issued by the model in evaluation of a defined tool, that represents\nexecuted OpenAPI operations.", "properties": { "openapi": { "type": "object", "description": "Reserved for future use.", "additionalProperties": { "type": "string" }, "x-ms-client-name": "openAPI" } }, "required": [ "openapi" ], "allOf": [ { "$ref": "#/definitions/RunStepToolCall" } ], "x-ms-discriminator-value": "openapi" }, "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." } ] } }, "RunStepStreamEvent": { "type": "string", "description": "Run step operation related streaming events", "enum": [ "thread.run.step.created", "thread.run.step.in_progress", "thread.run.step.delta", "thread.run.step.completed", "thread.run.step.failed", "thread.run.step.cancelled", "thread.run.step.expired" ], "x-ms-enum": { "name": "RunStepStreamEvent", "modelAsString": true, "values": [ { "name": "ThreadRunStepCreated", "value": "thread.run.step.created", "description": "Event sent when a new thread run step is created. The data of this event is of type RunStep" }, { "name": "ThreadRunStepInProgress", "value": "thread.run.step.in_progress", "description": "Event sent when a run step moves to `in_progress` status. The data of this event is of type RunStep" }, { "name": "ThreadRunStepDelta", "value": "thread.run.step.delta", "description": "Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk" }, { "name": "ThreadRunStepCompleted", "value": "thread.run.step.completed", "description": "Event sent when a run step is completed. The data of this event is of type RunStep" }, { "name": "ThreadRunStepFailed", "value": "thread.run.step.failed", "description": "Event sent when a run step fails. The data of this event is of type RunStep" }, { "name": "ThreadRunStepCancelled", "value": "thread.run.step.cancelled", "description": "Event sent when a run step is cancelled. The data of this event is of type RunStep" }, { "name": "ThreadRunStepExpired", "value": "thread.run.step.expired", "description": "Event sent when a run step is expired. The data of this event is of type RunStep" } ] } }, "RunStepToolCall": { "type": "object", "description": "An abstract representation of a detailed tool call as recorded within a run step for an existing run.", "properties": { "type": { "type": "string", "description": "The object type." }, "id": { "type": "string", "description": "The ID of the tool call. This ID must be referenced when you submit tool outputs." } }, "discriminator": "type", "required": [ "type", "id" ] }, "RunStepToolCallDetails": { "type": "object", "description": "The detailed information associated with a run step calling tools.", "properties": { "tool_calls": { "type": "array", "description": "A list of tool call details for this run step.", "items": { "$ref": "#/definitions/RunStepToolCall" }, "x-ms-client-name": "toolCalls" } }, "required": [ "tool_calls" ], "allOf": [ { "$ref": "#/definitions/RunStepDetails" } ], "x-ms-discriminator-value": "tool_calls" }, "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." } ] } }, "RunStreamEvent": { "type": "string", "description": "Run operation related streaming events", "enum": [ "thread.run.created", "thread.run.queued", "thread.run.in_progress", "thread.run.requires_action", "thread.run.completed", "thread.run.incomplete", "thread.run.failed", "thread.run.cancelling", "thread.run.cancelled", "thread.run.expired" ], "x-ms-enum": { "name": "RunStreamEvent", "modelAsString": true, "values": [ { "name": "ThreadRunCreated", "value": "thread.run.created", "description": "Event sent when a new run is created. The data of this event is of type ThreadRun" }, { "name": "ThreadRunQueued", "value": "thread.run.queued", "description": "Event sent when a run moves to `queued` status. The data of this event is of type ThreadRun" }, { "name": "ThreadRunInProgress", "value": "thread.run.in_progress", "description": "Event sent when a run moves to `in_progress` status. The data of this event is of type ThreadRun" }, { "name": "ThreadRunRequiresAction", "value": "thread.run.requires_action", "description": "Event sent when a run moves to `requires_action` status. The data of this event is of type ThreadRun" }, { "name": "ThreadRunCompleted", "value": "thread.run.completed", "description": "Event sent when a run is completed. The data of this event is of type ThreadRun" }, { "name": "ThreadRunIncomplete", "value": "thread.run.incomplete", "description": "Event sent when a run ends incomplete. The data of this event is of type ThreadRun" }, { "name": "ThreadRunFailed", "value": "thread.run.failed", "description": "Event sent when a run fails. The data of this event is of type ThreadRun" }, { "name": "ThreadRunCancelling", "value": "thread.run.cancelling", "description": "Event sent when a run moves to `cancelling` status. The data of this event is of type ThreadRun" }, { "name": "ThreadRunCancelled", "value": "thread.run.cancelled", "description": "Event sent when a run is cancelled. The data of this event is of type ThreadRun" }, { "name": "ThreadRunExpired", "value": "thread.run.expired", "description": "Event sent when a run is expired. The data of this event is of type ThreadRun" } ] } }, "StructuredToolOutput": { "type": "object", "description": "The data provided during a tool outputs submission to resolve pending tool calls and allow the model to continue.", "properties": { "type": { "type": "string", "description": "The object type for the tool output. Defaults to `function_call_output` if not provided.", "default": "function_call_output" }, "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" } }, "discriminator": "type", "required": [ "type" ] }, "SubmitToolOutputsAction": { "type": "object", "description": "The details for required tool calls that must be submitted for an agent thread run to continue.", "properties": { "submit_tool_outputs": { "$ref": "#/definitions/SubmitToolOutputsDetails", "description": "The details describing tools that should be called to submit tool outputs.", "x-ms-client-name": "submitToolOutputs" } }, "required": [ "submit_tool_outputs" ], "allOf": [ { "$ref": "#/definitions/RequiredAction" } ], "x-ms-discriminator-value": "submit_tool_outputs" }, "SubmitToolOutputsDetails": { "type": "object", "description": "The details describing tools that should be called to submit tool outputs.", "properties": { "tool_calls": { "type": "array", "description": "The list of tool calls that must be resolved for the agent thread run to continue.", "items": { "$ref": "#/definitions/RequiredToolCall" }, "x-ms-client-name": "toolCalls" } }, "required": [ "tool_calls" ] }, "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" ] }, "ThreadMessage": { "type": "object", "description": "A single, existing message within an agent 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" }, "status": { "$ref": "#/definitions/MessageStatus", "description": "The status of the message." }, "incomplete_details": { "$ref": "#/definitions/MessageIncompleteDetails", "description": "On an incomplete message, details about why the message is incomplete.", "x-nullable": true, "x-ms-client-name": "incompleteDetails" }, "completed_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp (in seconds) for when the message was completed.", "x-nullable": true, "x-ms-client-name": "completedAt" }, "incomplete_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", "x-nullable": true, "x-ms-client-name": "incompleteAt" }, "role": { "$ref": "#/definitions/MessageRole", "description": "The role associated with the agent thread message." }, "content": { "type": "array", "description": "The list of content items associated with the agent thread message.", "items": { "$ref": "#/definitions/MessageContent" } }, "assistant_id": { "type": "string", "description": "If applicable, the ID of the agent that authored this message.", "x-nullable": true, "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-nullable": true, "x-ms-client-name": "runId" }, "attachments": { "type": "array", "description": "A list of files attached to the message, and the tools they were added to.", "x-nullable": true, "items": { "$ref": "#/definitions/MessageAttachment" } }, "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", "status", "incomplete_details", "completed_at", "incomplete_at", "role", "content", "assistant_id", "run_id", "attachments", "metadata" ] }, "ThreadMessageOptions": { "type": "object", "description": "A single message within an agent thread,\nas provided during that thread's creation for its initial state.", "properties": { "role": { "$ref": "#/definitions/MessageRole", "description": "The role of the entity that is creating the message. Allowed values include:\n`user`, which indicates the message is sent by an actual user (and should be\nused in most cases to represent user-generated messages), and `assistant`,\nwhich indicates the message is generated by the agent (use this value to insert\nmessages from the agent into the conversation)." }, "content": { "$ref": "#/definitions/MessageInputContent", "description": "The content of the initial message. This may be a basic string (if you only\nneed text) or an array of typed content blocks (for example, text, image_file,\nimage_url, and so on)." }, "attachments": { "type": "array", "description": "A list of files attached to the message, and the tools they should be added to.", "x-nullable": true, "items": { "$ref": "#/definitions/MessageAttachment" } }, "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" ] }, "ThreadRun": { "type": "object", "description": "Data representing a single evaluation run of an agent 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 agent associated with the thread this run was performed against.", "x-ms-client-name": "assistantId" }, "status": { "$ref": "#/definitions/RunStatus", "description": "The status of the agent thread run." }, "required_action": { "$ref": "#/definitions/RequiredAction", "description": "The details of the action required for the agent thread run to continue.", "x-nullable": true, "x-ms-client-name": "requiredAction" }, "last_error": { "$ref": "#/definitions/RunError", "description": "The last error, if any, encountered by this agent thread run.", "x-nullable": true, "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 agent thread run." }, "tools": { "type": "array", "description": "The overridden enabled tools used for this agent thread run.", "default": [], "items": { "$ref": "#/definitions/ToolDefinition" } }, "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": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this item expires.", "x-nullable": true, "x-ms-client-name": "expiresAt" }, "started_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this item was started.", "x-nullable": true, "x-ms-client-name": "startedAt" }, "completed_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this completed.", "x-nullable": true, "x-ms-client-name": "completedAt" }, "cancelled_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this was cancelled.", "x-nullable": true, "x-ms-client-name": "cancelledAt" }, "failed_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp, in seconds, representing when this failed.", "x-nullable": true, "x-ms-client-name": "failedAt" }, "incomplete_details": { "$ref": "#/definitions/IncompleteRunDetails", "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", "x-nullable": true, "x-ms-client-name": "incompleteDetails" }, "usage": { "$ref": "#/definitions/RunCompletionUsage", "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", "x-nullable": true }, "temperature": { "type": "number", "format": "float", "description": "The sampling temperature used for this run. If not set, defaults to 1.", "x-nullable": true }, "top_p": { "type": "number", "format": "float", "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", "x-nullable": true, "x-ms-client-name": "topP" }, "max_prompt_tokens": { "type": "integer", "format": "int32", "description": "The maximum number of prompt tokens specified to have been used over the course of the run.", "minimum": 256, "x-nullable": true, "x-ms-client-name": "maxPromptTokens" }, "max_completion_tokens": { "type": "integer", "format": "int32", "description": "The maximum number of completion tokens specified to have been used over the course of the run.", "minimum": 256, "x-nullable": true, "x-ms-client-name": "maxCompletionTokens" }, "truncation_strategy": { "$ref": "#/definitions/TruncationObject", "description": "The strategy to use for dropping messages as the context windows moves forward.", "x-nullable": true, "x-ms-client-name": "truncationStrategy" }, "tool_choice": { "$ref": "#/definitions/AgentsToolChoiceOption", "description": "Controls whether or not and which tool is called by the model.", "x-nullable": true, "x-ms-client-name": "toolChoice" }, "response_format": { "$ref": "#/definitions/AgentsResponseFormatOption", "description": "The response format of the tool calls used in this run.", "x-nullable": true, "x-ms-client-name": "responseFormat" }, "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" } }, "tool_resources": { "$ref": "#/definitions/ToolResources", "description": "Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis", "x-nullable": true, "x-ms-client-name": "toolResources" }, "parallel_tool_calls": { "type": "boolean", "description": "Determines if tools can be executed in parallel within the run.", "x-ms-client-name": "parallelToolCalls" } }, "required": [ "id", "object", "thread_id", "assistant_id", "status", "last_error", "model", "instructions", "tools", "created_at", "expires_at", "started_at", "completed_at", "cancelled_at", "failed_at", "incomplete_details", "usage", "max_prompt_tokens", "max_completion_tokens", "truncation_strategy", "tool_choice", "response_format", "metadata", "parallel_tool_calls" ] }, "ThreadStreamEvent": { "type": "string", "description": "Thread operation related streaming events", "enum": [ "thread.created" ], "x-ms-enum": { "name": "ThreadStreamEvent", "modelAsString": true, "values": [ { "name": "ThreadCreated", "value": "thread.created", "description": "Event sent when a new thread is created. The data of this event is of type AgentThread" } ] } }, "ToolConnection": { "type": "object", "description": "A connection resource.", "properties": { "connection_id": { "type": "string", "description": "A connection in a ToolConnectionList attached to this tool.", "x-ms-client-name": "connectionId" } }, "required": [ "connection_id" ] }, "ToolConnectionList": { "type": "object", "description": "A set of connection resources currently used by either the `bing_grounding`, `fabric_dataagent`, or `sharepoint_grounding` tools.", "properties": { "connections": { "type": "array", "description": "The connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool.", "maxItems": 1, "items": { "$ref": "#/definitions/ToolConnection" }, "x-ms-client-name": "connectionList" } } }, "ToolDefinition": { "type": "object", "description": "An abstract representation of an input tool definition that an agent can use.", "properties": { "type": { "type": "string", "description": "The object type." } }, "discriminator": "type", "required": [ "type" ] }, "ToolOutput": { "type": "object", "description": "The output from a function tool to be submitted.", "properties": { "output": { "type": "string", "description": "The output from the function tool to be submitted." } }, "allOf": [ { "$ref": "#/definitions/StructuredToolOutput" } ], "x-ms-discriminator-value": "function_call_output" }, "ToolResources": { "type": "object", "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of\ntool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search`\ntool requires a list of vector store IDs.", "properties": { "code_interpreter": { "$ref": "#/definitions/CodeInterpreterToolResource", "description": "Resources to be used by the `code_interpreter` tool consisting of file IDs.", "x-ms-client-name": "codeInterpreter" }, "file_search": { "$ref": "#/definitions/FileSearchToolResource", "description": "Resources to be used by the `file_search` tool consisting of vector store IDs.", "x-ms-client-name": "fileSearch" }, "azure_ai_search": { "$ref": "#/definitions/AzureAISearchToolResource", "description": "Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.", "x-ms-client-name": "azureAISearch" } } }, "TruncationObject": { "type": "object", "description": "Controls for how a thread will be truncated prior to the run. Use this to control the initial\ncontext window of the run.", "properties": { "type": { "type": "string", "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will\nbe truncated to the `lastMessages` count most recent messages in the thread. When set to `auto`, messages in the middle of the thread\nwill be dropped to fit the context length of the model, `max_prompt_tokens`.", "default": "auto", "enum": [ "auto", "last_messages" ], "x-ms-enum": { "name": "TruncationStrategy", "modelAsString": true, "values": [ { "name": "auto", "value": "auto", "description": "Default value. Messages in the middle of the thread will be dropped to fit the context length of the model." }, { "name": "lastMessages", "value": "last_messages", "description": "The thread will truncate to the `lastMessages` count of recent messages." } ] } }, "last_messages": { "type": "integer", "format": "int32", "description": "The number of most recent messages from the thread when constructing the context for the run.", "minimum": 1, "x-nullable": true, "x-ms-client-name": "lastMessages" } }, "required": [ "type" ] }, "TruncationStrategy": { "type": "string", "description": "Possible truncation strategies for the thread.", "enum": [ "auto", "last_messages" ], "x-ms-enum": { "name": "TruncationStrategy", "modelAsString": true, "values": [ { "name": "auto", "value": "auto", "description": "Default value. Messages in the middle of the thread will be dropped to fit the context length of the model." }, { "name": "lastMessages", "value": "last_messages", "description": "The thread will truncate to the `lastMessages` count of recent messages." } ] } }, "UpdateAgentOptions": { "type": "object", "description": "The request details to use when modifying an existing agent.", "properties": { "model": { "type": "string", "description": "The ID of the model to use." }, "name": { "type": "string", "description": "The modified name for the agent to use.", "x-nullable": true }, "description": { "type": "string", "description": "The modified description for the agent to use.", "x-nullable": true }, "instructions": { "type": "string", "description": "The modified system instructions for the new agent to use.", "x-nullable": true }, "tools": { "type": "array", "description": "The modified collection of tools to enable for the agent.", "default": [], "items": { "$ref": "#/definitions/ToolDefinition" } }, "tool_resources": { "$ref": "#/definitions/ToolResources", "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example,\nthe `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.", "x-ms-client-name": "toolResources" }, "temperature": { "type": "number", "format": "float", "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,\nwhile lower values like 0.2 will make it more focused and deterministic.", "default": 1, "minimum": 0, "maximum": 2, "x-nullable": true }, "top_p": { "type": "number", "format": "float", "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.\nSo 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.", "default": 1, "minimum": 0, "maximum": 1, "x-nullable": true, "x-ms-client-name": "topP" }, "response_format": { "$ref": "#/definitions/AgentsResponseFormatOption", "description": "The response format of the tool calls used by this agent.", "x-nullable": true, "x-ms-client-name": "responseFormat" }, "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" } } } }, "UpdateAgentThreadOptions": { "type": "object", "description": "The details used to update an existing agent thread", "properties": { "tool_resources": { "$ref": "#/definitions/ToolResources", "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\na list of vector store IDs", "x-nullable": true, "x-ms-client-name": "toolResources" }, "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" } } } }, "VectorStore": { "type": "object", "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", "properties": { "id": { "type": "string", "description": "The identifier, which can be referenced in API endpoints." }, "object": { "type": "string", "description": "The object type, which is always `vector_store`", "enum": [ "vector_store" ], "x-ms-enum": { "modelAsString": false } }, "created_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp (in seconds) for when the vector store was created.", "x-ms-client-name": "createdAt" }, "name": { "type": "string", "description": "The name of the vector store." }, "usage_bytes": { "type": "integer", "format": "int32", "description": "The total number of bytes used by the files in the vector store.", "x-ms-client-name": "usageBytes" }, "file_counts": { "$ref": "#/definitions/VectorStoreFileCount", "description": "Files count grouped by status processed or being processed by this vector store.", "x-ms-client-name": "fileCounts" }, "status": { "$ref": "#/definitions/VectorStoreStatus", "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use." }, "expires_after": { "$ref": "#/definitions/VectorStoreExpirationPolicy", "description": "Details on when this vector store expires", "x-ms-client-name": "expiresAfter" }, "expires_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp (in seconds) for when the vector store will expire.", "x-nullable": true, "x-ms-client-name": "expiresAt" }, "last_active_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp (in seconds) for when the vector store was last active.", "x-nullable": true, "x-ms-client-name": "lastActiveAt" }, "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", "usage_bytes", "file_counts", "status", "last_active_at", "metadata" ] }, "VectorStoreAutoChunkingStrategyRequest": { "type": "object", "description": "The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.", "allOf": [ { "$ref": "#/definitions/VectorStoreChunkingStrategyRequest" } ], "x-ms-discriminator-value": "auto" }, "VectorStoreAutoChunkingStrategyResponse": { "type": "object", "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API.", "allOf": [ { "$ref": "#/definitions/VectorStoreChunkingStrategyResponse" } ], "x-ms-discriminator-value": "other" }, "VectorStoreChunkingStrategyRequest": { "type": "object", "description": "An abstract representation of a vector store chunking strategy configuration.", "properties": { "type": { "$ref": "#/definitions/VectorStoreChunkingStrategyRequestType", "description": "The object type." } }, "discriminator": "type", "required": [ "type" ] }, "VectorStoreChunkingStrategyRequestType": { "type": "string", "description": "Type of chunking strategy", "enum": [ "auto", "static" ], "x-ms-enum": { "name": "VectorStoreChunkingStrategyRequestType", "modelAsString": true, "values": [ { "name": "auto", "value": "auto" }, { "name": "static", "value": "static" } ] } }, "VectorStoreChunkingStrategyResponse": { "type": "object", "description": "An abstract representation of a vector store chunking strategy configuration.", "properties": { "type": { "$ref": "#/definitions/VectorStoreChunkingStrategyResponseType", "description": "The object type." } }, "discriminator": "type", "required": [ "type" ] }, "VectorStoreChunkingStrategyResponseType": { "type": "string", "description": "Type of chunking strategy", "enum": [ "other", "static" ], "x-ms-enum": { "name": "VectorStoreChunkingStrategyResponseType", "modelAsString": true, "values": [ { "name": "other", "value": "other" }, { "name": "static", "value": "static" } ] } }, "VectorStoreConfiguration": { "type": "object", "description": "Vector storage configuration is the list of data sources, used when multiple\nfiles can be used for the enterprise file search.", "properties": { "data_sources": { "type": "array", "description": "Data sources", "items": { "$ref": "#/definitions/VectorStoreDataSource" }, "x-ms-client-name": "dataSources" } }, "required": [ "data_sources" ] }, "VectorStoreConfigurations": { "type": "object", "description": "The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs.", "properties": { "name": { "type": "string", "description": "Name", "x-ms-client-name": "storeName" }, "configuration": { "$ref": "#/definitions/VectorStoreConfiguration", "description": "Configurations", "x-ms-client-name": "storeConfiguration" } }, "required": [ "name", "configuration" ] }, "VectorStoreDataSource": { "type": "object", "description": "The structure, containing Azure asset URI path and the asset type of the file used as a data source\nfor the enterprise file search.", "properties": { "uri": { "type": "string", "description": "Asset URI.", "x-ms-client-name": "assetIdentifier" }, "type": { "$ref": "#/definitions/VectorStoreDataSourceAssetType", "description": "The asset type", "x-ms-client-name": "assetType" } }, "required": [ "uri", "type" ] }, "VectorStoreDataSourceAssetType": { "type": "string", "description": "Type of vector storage asset. Asset type may be a uri_asset, in this case it should contain asset URI ID,\nin the case of id_asset it should contain the data ID.", "enum": [ "uri_asset", "id_asset" ], "x-ms-enum": { "name": "VectorStoreDataSourceAssetType", "modelAsString": true, "values": [ { "name": "uri_asset", "value": "uri_asset", "description": "Azure URI" }, { "name": "id_asset", "value": "id_asset", "description": "The data ID" } ] } }, "VectorStoreDeletionStatus": { "type": "object", "description": "Response object for deleting a vector store.", "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 'vector_store.deleted'.", "enum": [ "vector_store.deleted" ], "x-ms-enum": { "modelAsString": false } } }, "required": [ "id", "deleted", "object" ] }, "VectorStoreExpirationPolicy": { "type": "object", "description": "The expiration policy for a vector store.", "properties": { "anchor": { "$ref": "#/definitions/VectorStoreExpirationPolicyAnchor", "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`." }, "days": { "type": "integer", "format": "int32", "description": "The anchor timestamp after which the expiration policy applies.", "minimum": 1, "maximum": 365 } }, "required": [ "anchor", "days" ] }, "VectorStoreExpirationPolicyAnchor": { "type": "string", "description": "Describes the relationship between the days and the expiration of this vector store", "enum": [ "last_active_at" ], "x-ms-enum": { "name": "VectorStoreExpirationPolicyAnchor", "modelAsString": true, "values": [ { "name": "lastActiveAt", "value": "last_active_at", "description": "The expiration policy is based on the last time the vector store was active." } ] } }, "VectorStoreFile": { "type": "object", "description": "Description of a file attached to a vector store.", "properties": { "id": { "type": "string", "description": "The identifier, which can be referenced in API endpoints." }, "object": { "type": "string", "description": "The object type, which is always `vector_store.file`.", "enum": [ "vector_store.file" ], "x-ms-enum": { "modelAsString": false } }, "usage_bytes": { "type": "integer", "format": "int32", "description": "The total vector store usage in bytes. Note that this may be different from the original file\nsize.", "x-ms-client-name": "usageBytes" }, "created_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp (in seconds) for when the vector store file was created.", "x-ms-client-name": "createdAt" }, "vector_store_id": { "type": "string", "description": "The ID of the vector store that the file is attached to.", "x-ms-client-name": "vectorStoreId" }, "status": { "$ref": "#/definitions/VectorStoreFileStatus", "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use." }, "last_error": { "$ref": "#/definitions/VectorStoreFileError", "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", "x-nullable": true, "x-ms-client-name": "lastError" }, "chunking_strategy": { "$ref": "#/definitions/VectorStoreChunkingStrategyResponse", "description": "The strategy used to chunk the file.", "x-ms-client-name": "chunkingStrategy" } }, "required": [ "id", "object", "usage_bytes", "created_at", "vector_store_id", "status", "last_error", "chunking_strategy" ] }, "VectorStoreFileBatch": { "type": "object", "description": "A batch of files attached to a vector store.", "properties": { "id": { "type": "string", "description": "The identifier, which can be referenced in API endpoints." }, "object": { "type": "string", "description": "The object type, which is always `vector_store.file_batch`.", "enum": [ "vector_store.files_batch" ], "x-ms-enum": { "modelAsString": false } }, "created_at": { "type": "integer", "format": "unixtime", "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", "x-ms-client-name": "createdAt" }, "vector_store_id": { "type": "string", "description": "The ID of the vector store that the file is attached to.", "x-ms-client-name": "vectorStoreId" }, "status": { "$ref": "#/definitions/VectorStoreFileBatchStatus", "description": "The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`." }, "file_counts": { "$ref": "#/definitions/VectorStoreFileCount", "description": "Files count grouped by status processed or being processed by this vector store.", "x-ms-client-name": "fileCounts" } }, "required": [ "id", "object", "created_at", "vector_store_id", "status", "file_counts" ] }, "VectorStoreFileBatchStatus": { "type": "string", "description": "The status of the vector store file batch.", "enum": [ "in_progress", "completed", "cancelled", "failed" ], "x-ms-enum": { "name": "VectorStoreFileBatchStatus", "modelAsString": true, "values": [ { "name": "inProgress", "value": "in_progress", "description": "The vector store is still processing this file batch." }, { "name": "completed", "value": "completed", "description": "the vector store file batch is ready for use." }, { "name": "cancelled", "value": "cancelled", "description": "The vector store file batch was cancelled." }, { "name": "failed", "value": "failed", "description": "The vector store file batch failed to process." } ] } }, "VectorStoreFileCount": { "type": "object", "description": "Counts of files processed or being processed by this vector store grouped by status.", "properties": { "in_progress": { "type": "integer", "format": "int32", "description": "The number of files that are currently being processed.", "x-ms-client-name": "inProgress" }, "completed": { "type": "integer", "format": "int32", "description": "The number of files that have been successfully processed." }, "failed": { "type": "integer", "format": "int32", "description": "The number of files that have failed to process." }, "cancelled": { "type": "integer", "format": "int32", "description": "The number of files that were cancelled." }, "total": { "type": "integer", "format": "int32", "description": "The total number of files." } }, "required": [ "in_progress", "completed", "failed", "cancelled", "total" ] }, "VectorStoreFileDeletionStatus": { "type": "object", "description": "Response object for deleting a vector store file relationship.", "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 'vector_store.deleted'.", "enum": [ "vector_store.file.deleted" ], "x-ms-enum": { "modelAsString": false } } }, "required": [ "id", "deleted", "object" ] }, "VectorStoreFileError": { "type": "object", "description": "Details on the error that may have occurred while processing a file for this vector store", "properties": { "code": { "$ref": "#/definitions/VectorStoreFileErrorCode", "description": "One of `server_error` or `rate_limit_exceeded`." }, "message": { "type": "string", "description": "A human-readable description of the error." } }, "required": [ "code", "message" ] }, "VectorStoreFileErrorCode": { "type": "string", "description": "Error code variants for vector store file processing", "enum": [ "server_error", "invalid_file", "unsupported_file" ], "x-ms-enum": { "name": "VectorStoreFileErrorCode", "modelAsString": true, "values": [ { "name": "serverError", "value": "server_error", "description": "An server error occurred." }, { "name": "invalidFile", "value": "invalid_file", "description": "The file is not valid." }, { "name": "unsupportedFile", "value": "unsupported_file", "description": "The file is of unsupported type." } ] } }, "VectorStoreFileStatus": { "type": "string", "description": "Vector store file status", "enum": [ "in_progress", "completed", "failed", "cancelled" ], "x-ms-enum": { "name": "VectorStoreFileStatus", "modelAsString": true, "values": [ { "name": "inProgress", "value": "in_progress", "description": "The file is currently being processed." }, { "name": "completed", "value": "completed", "description": "The file has been successfully processed." }, { "name": "failed", "value": "failed", "description": "The file has failed to process." }, { "name": "cancelled", "value": "cancelled", "description": "The file was cancelled." } ] } }, "VectorStoreFileStatusFilter": { "type": "string", "description": "Query parameter filter for vector store file retrieval endpoint", "enum": [ "in_progress", "completed", "failed", "cancelled" ], "x-ms-enum": { "name": "VectorStoreFileStatusFilter", "modelAsString": true, "values": [ { "name": "inProgress", "value": "in_progress", "description": "Retrieve only files that are currently being processed" }, { "name": "completed", "value": "completed", "description": "Retrieve only files that have been successfully processed" }, { "name": "failed", "value": "failed", "description": "Retrieve only files that have failed to process" }, { "name": "cancelled", "value": "cancelled", "description": "Retrieve only files that were cancelled" } ] } }, "VectorStoreOptions": { "type": "object", "description": "Request object for creating a vector store.", "properties": { "file_ids": { "type": "array", "description": "A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files.", "maxItems": 500, "items": { "type": "string" }, "x-ms-client-name": "fileIds" }, "name": { "type": "string", "description": "The name of the vector store." }, "configuration": { "$ref": "#/definitions/VectorStoreConfiguration", "description": "The vector store configuration, used when vector store is created from Azure asset URIs.", "x-ms-client-name": "storeConfiguration" }, "expires_after": { "$ref": "#/definitions/VectorStoreExpirationPolicy", "description": "Details on when this vector store expires", "x-ms-client-name": "expiresAfter" }, "chunking_strategy": { "$ref": "#/definitions/VectorStoreChunkingStrategyRequest", "description": "The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty.", "x-ms-client-name": "chunkingStrategy" }, "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" } } } }, "VectorStoreStaticChunkingStrategyOptions": { "type": "object", "description": "Options to configure a vector store static chunking strategy.", "properties": { "max_chunk_size_tokens": { "type": "integer", "format": "int32", "description": "The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096.", "minimum": 100, "maximum": 4096, "x-ms-client-name": "maxChunkSizeTokens" }, "chunk_overlap_tokens": { "type": "integer", "format": "int32", "description": "The number of tokens that overlap between chunks. The default value is 400.\nNote that the overlap must not exceed half of max_chunk_size_tokens.", "x-ms-client-name": "chunkOverlapTokens" } }, "required": [ "max_chunk_size_tokens", "chunk_overlap_tokens" ] }, "VectorStoreStaticChunkingStrategyRequest": { "type": "object", "description": "A statically configured chunking strategy.", "properties": { "static": { "$ref": "#/definitions/VectorStoreStaticChunkingStrategyOptions", "description": "The options for the static chunking strategy." } }, "required": [ "static" ], "allOf": [ { "$ref": "#/definitions/VectorStoreChunkingStrategyRequest" } ], "x-ms-discriminator-value": "static" }, "VectorStoreStaticChunkingStrategyResponse": { "type": "object", "description": "A statically configured chunking strategy.", "properties": { "static": { "$ref": "#/definitions/VectorStoreStaticChunkingStrategyOptions", "description": "The options for the static chunking strategy." } }, "required": [ "static" ], "allOf": [ { "$ref": "#/definitions/VectorStoreChunkingStrategyResponse" } ], "x-ms-discriminator-value": "static" }, "VectorStoreStatus": { "type": "string", "description": "Vector store possible status", "enum": [ "expired", "in_progress", "completed" ], "x-ms-enum": { "name": "VectorStoreStatus", "modelAsString": true, "values": [ { "name": "expired", "value": "expired", "description": "expired status indicates that this vector store has expired and is no longer available for use." }, { "name": "inProgress", "value": "in_progress", "description": "in_progress status indicates that this vector store is still processing files." }, { "name": "completed", "value": "completed", "description": "completed status indicates that this vector store is ready for use." } ] } }, "VectorStoreUpdateOptions": { "type": "object", "description": "Request object for updating a vector store.", "properties": { "name": { "type": "string", "description": "The name of the vector store.", "x-nullable": true }, "expires_after": { "$ref": "#/definitions/VectorStoreExpirationPolicy", "description": "Details on when this vector store expires", "x-nullable": true, "x-ms-client-name": "expiresAfter" }, "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" } } } } }, "parameters": { "Azure.Core.Foundations.ApiVersionParameter": { "name": "api-version", "in": "query", "description": "The API version to use for this operation.", "required": true, "type": "string", "minLength": 1, "x-ms-parameter-location": "method", "x-ms-client-name": "apiVersion" }, "DeleteAgentOptions": { "name": "assistantId", "in": "path", "description": "Identifier of the agent.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "GetAgentOptions": { "name": "assistantId", "in": "path", "description": "Identifier of the agent.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "UpdateAgentOptions.assistantId": { "name": "assistantId", "in": "path", "description": "The ID of the agent to modify.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "UpdateAgentThreadOptions.threadId": { "name": "threadId", "in": "path", "description": "The ID of the thread to modify.", "required": true, "type": "string", "x-ms-parameter-location": "method" } } }