次の方法で共有


PersistentAgentsAdministrationClient Class

  • java.lang.Object
    • com.azure.ai.agents.persistent.PersistentAgentsAdministrationClient

public final class PersistentAgentsAdministrationClient

Initializes a new instance of the synchronous PersistentAgentsAdministration type.

Method Summary

Modifier and Type Method and Description
PersistentAgent createAgent(CreateAgentOptions options)

Creates a new agent.

Response<BinaryData> createAgentWithResponse(BinaryData createAgentRequest, RequestOptions requestOptions)

Creates a new agent.

void deleteAgent(String assistantId)

Deletes an agent.

PersistentAgent getAgent(String assistantId)

Retrieves an existing agent.

Response<BinaryData> getAgentWithResponse(String assistantId, RequestOptions requestOptions)

Retrieves an existing agent.

PagedIterable<PersistentAgent> listAgents()

Gets a list of agents that were previously created.

PagedIterable<PersistentAgent> listAgents(Integer limit, ListSortOrder order, String after, String before)

Gets a list of agents that were previously created.

PagedIterable<BinaryData> listAgents(RequestOptions requestOptions)

Gets a list of agents that were previously created.

PersistentAgent updateAgent(UpdateAgentOptions options)

Modifies an existing agent.

Response<BinaryData> updateAgentWithResponse(String assistantId, BinaryData updateAgentRequest, RequestOptions requestOptions)

Modifies an existing agent.

Methods inherited from java.lang.Object

Method Details

createAgent

public PersistentAgent createAgent(CreateAgentOptions options)

Creates a new agent.

Parameters:

options - Options for createAgent API.

Returns:

represents an agent that can call the model and use tools.

createAgentWithResponse

public Response<BinaryData> createAgentWithResponse(BinaryData createAgentRequest, RequestOptions requestOptions)

Creates a new agent.

Request Body Schema

{
     model: String (Required)
     name: String (Optional)
     description: String (Optional)
     instructions: String (Optional)
     tools (Optional): [
          (Optional){
             type: String (Required)
         }
     ]
     tool_resources (Optional): {
         code_interpreter (Optional): {
             file_ids (Optional): [
                 String (Optional)
             ]
             data_sources (Optional): [
                  (Optional){
                     uri: String (Required)
                     type: String(uri_asset/id_asset) (Required)
                 }
             ]
         }
         file_search (Optional): {
             vector_store_ids (Optional): [
                 String (Optional)
             ]
             vector_stores (Optional): [
                  (Optional){
                     name: String (Required)
                     configuration (Required): {
                         data_sources (Required): [
                             (recursive schema, see above)
                         ]
                     }
                 }
             ]
         }
         azure_ai_search (Optional): {
             indexes (Optional): [
                  (Optional){
                     index_connection_id: String (Optional)
                     index_name: String (Optional)
                     query_type: String(simple/semantic/vector/vector_simple_hybrid/vector_semantic_hybrid) (Optional)
                     top_k: Integer (Optional)
                     filter: String (Optional)
                     index_asset_id: String (Optional)
                 }
             ]
         }
     }
     temperature: Double (Optional)
     top_p: Double (Optional)
     response_format: BinaryData (Optional)
     metadata (Optional): {
         String: String (Required)
     }
 }

Response Body Schema

{
     id: String (Required)
     object: String (Required)
     created_at: long (Required)
     name: String (Required)
     description: String (Required)
     model: String (Required)
     instructions: String (Required)
     tools (Required): [
          (Required){
             type: String (Required)
         }
     ]
     tool_resources (Required): {
         code_interpreter (Optional): {
             file_ids (Optional): [
                 String (Optional)
             ]
             data_sources (Optional): [
                  (Optional){
                     uri: String (Required)
                     type: String(uri_asset/id_asset) (Required)
                 }
             ]
         }
         file_search (Optional): {
             vector_store_ids (Optional): [
                 String (Optional)
             ]
             vector_stores (Optional): [
                  (Optional){
                     name: String (Required)
                     configuration (Required): {
                         data_sources (Required): [
                             (recursive schema, see above)
                         ]
                     }
                 }
             ]
         }
         azure_ai_search (Optional): {
             indexes (Optional): [
                  (Optional){
                     index_connection_id: String (Optional)
                     index_name: String (Optional)
                     query_type: String(simple/semantic/vector/vector_simple_hybrid/vector_semantic_hybrid) (Optional)
                     top_k: Integer (Optional)
                     filter: String (Optional)
                     index_asset_id: String (Optional)
                 }
             ]
         }
     }
     temperature: Double (Required)
     top_p: Double (Required)
     response_format: BinaryData (Optional)
     metadata (Required): {
         String: String (Required)
     }
 }

Parameters:

createAgentRequest - The createAgentRequest parameter.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents an agent that can call the model and use tools along with Response<T>.

deleteAgent

public void deleteAgent(String assistantId)

Deletes an agent.

Parameters:

assistantId - Identifier of the agent.

getAgent

public PersistentAgent getAgent(String assistantId)

Retrieves an existing agent.

Parameters:

assistantId - Identifier of the agent.

Returns:

represents an agent that can call the model and use tools.

getAgentWithResponse

public Response<BinaryData> getAgentWithResponse(String assistantId, RequestOptions requestOptions)

Retrieves an existing agent.

Response Body Schema

{
     id: String (Required)
     object: String (Required)
     created_at: long (Required)
     name: String (Required)
     description: String (Required)
     model: String (Required)
     instructions: String (Required)
     tools (Required): [
          (Required){
             type: String (Required)
         }
     ]
     tool_resources (Required): {
         code_interpreter (Optional): {
             file_ids (Optional): [
                 String (Optional)
             ]
             data_sources (Optional): [
                  (Optional){
                     uri: String (Required)
                     type: String(uri_asset/id_asset) (Required)
                 }
             ]
         }
         file_search (Optional): {
             vector_store_ids (Optional): [
                 String (Optional)
             ]
             vector_stores (Optional): [
                  (Optional){
                     name: String (Required)
                     configuration (Required): {
                         data_sources (Required): [
                             (recursive schema, see above)
                         ]
                     }
                 }
             ]
         }
         azure_ai_search (Optional): {
             indexes (Optional): [
                  (Optional){
                     index_connection_id: String (Optional)
                     index_name: String (Optional)
                     query_type: String(simple/semantic/vector/vector_simple_hybrid/vector_semantic_hybrid) (Optional)
                     top_k: Integer (Optional)
                     filter: String (Optional)
                     index_asset_id: String (Optional)
                 }
             ]
         }
     }
     temperature: Double (Required)
     top_p: Double (Required)
     response_format: BinaryData (Optional)
     metadata (Required): {
         String: String (Required)
     }
 }

Parameters:

assistantId - Identifier of the agent.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents an agent that can call the model and use tools along with Response<T>.

listAgents

public PagedIterable<PersistentAgent> listAgents()

Gets a list of agents that were previously created.

Returns:

a list of agents that were previously created as paginated response with PagedIterable<T>.

listAgents

public PagedIterable<PersistentAgent> listAgents(Integer limit, ListSortOrder order, String after, String before)

Gets a list of agents that were previously created.

Parameters:

limit - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
order - Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
after - 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.
before - 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.

Returns:

a list of agents that were previously created as paginated response with PagedIterable<T>.

listAgents

public PagedIterable<BinaryData> listAgents(RequestOptions requestOptions)

Gets a list of agents that were previously created.

Query Parameters

| ------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name   | Type    | Required | Description                                                                                                                                                                                                                                                                           |
| limit  | Integer | No       | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.                                                                                                                                                                            |
| order  | String  | No       | Sort order by the created\_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc", "desc".                                                                                                                                         |
| after  | String  | No       | 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.       |
| before | String  | No       | 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. |

You can add these to a request with RequestOptions#addQueryParam

Response Body Schema

{
     id: String (Required)
     object: String (Required)
     created_at: long (Required)
     name: String (Required)
     description: String (Required)
     model: String (Required)
     instructions: String (Required)
     tools (Required): [
          (Required){
             type: String (Required)
         }
     ]
     tool_resources (Required): {
         code_interpreter (Optional): {
             file_ids (Optional): [
                 String (Optional)
             ]
             data_sources (Optional): [
                  (Optional){
                     uri: String (Required)
                     type: String(uri_asset/id_asset) (Required)
                 }
             ]
         }
         file_search (Optional): {
             vector_store_ids (Optional): [
                 String (Optional)
             ]
             vector_stores (Optional): [
                  (Optional){
                     name: String (Required)
                     configuration (Required): {
                         data_sources (Required): [
                             (recursive schema, see above)
                         ]
                     }
                 }
             ]
         }
         azure_ai_search (Optional): {
             indexes (Optional): [
                  (Optional){
                     index_connection_id: String (Optional)
                     index_name: String (Optional)
                     query_type: String(simple/semantic/vector/vector_simple_hybrid/vector_semantic_hybrid) (Optional)
                     top_k: Integer (Optional)
                     filter: String (Optional)
                     index_asset_id: String (Optional)
                 }
             ]
         }
     }
     temperature: Double (Required)
     top_p: Double (Required)
     response_format: BinaryData (Optional)
     metadata (Required): {
         String: String (Required)
     }
 }

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

a list of agents that were previously created as paginated response with PagedIterable<T>.

updateAgent

public PersistentAgent updateAgent(UpdateAgentOptions options)

Modifies an existing agent.

Parameters:

options - Options for updateAgent API.

Returns:

represents an agent that can call the model and use tools.

updateAgentWithResponse

public Response<BinaryData> updateAgentWithResponse(String assistantId, BinaryData updateAgentRequest, RequestOptions requestOptions)

Modifies an existing agent.

Request Body Schema

{
     model: String (Optional)
     name: String (Optional)
     description: String (Optional)
     instructions: String (Optional)
     tools (Optional): [
          (Optional){
             type: String (Required)
         }
     ]
     tool_resources (Optional): {
         code_interpreter (Optional): {
             file_ids (Optional): [
                 String (Optional)
             ]
             data_sources (Optional): [
                  (Optional){
                     uri: String (Required)
                     type: String(uri_asset/id_asset) (Required)
                 }
             ]
         }
         file_search (Optional): {
             vector_store_ids (Optional): [
                 String (Optional)
             ]
             vector_stores (Optional): [
                  (Optional){
                     name: String (Required)
                     configuration (Required): {
                         data_sources (Required): [
                             (recursive schema, see above)
                         ]
                     }
                 }
             ]
         }
         azure_ai_search (Optional): {
             indexes (Optional): [
                  (Optional){
                     index_connection_id: String (Optional)
                     index_name: String (Optional)
                     query_type: String(simple/semantic/vector/vector_simple_hybrid/vector_semantic_hybrid) (Optional)
                     top_k: Integer (Optional)
                     filter: String (Optional)
                     index_asset_id: String (Optional)
                 }
             ]
         }
     }
     temperature: Double (Optional)
     top_p: Double (Optional)
     response_format: BinaryData (Optional)
     metadata (Optional): {
         String: String (Required)
     }
 }

Response Body Schema

{
     id: String (Required)
     object: String (Required)
     created_at: long (Required)
     name: String (Required)
     description: String (Required)
     model: String (Required)
     instructions: String (Required)
     tools (Required): [
          (Required){
             type: String (Required)
         }
     ]
     tool_resources (Required): {
         code_interpreter (Optional): {
             file_ids (Optional): [
                 String (Optional)
             ]
             data_sources (Optional): [
                  (Optional){
                     uri: String (Required)
                     type: String(uri_asset/id_asset) (Required)
                 }
             ]
         }
         file_search (Optional): {
             vector_store_ids (Optional): [
                 String (Optional)
             ]
             vector_stores (Optional): [
                  (Optional){
                     name: String (Required)
                     configuration (Required): {
                         data_sources (Required): [
                             (recursive schema, see above)
                         ]
                     }
                 }
             ]
         }
         azure_ai_search (Optional): {
             indexes (Optional): [
                  (Optional){
                     index_connection_id: String (Optional)
                     index_name: String (Optional)
                     query_type: String(simple/semantic/vector/vector_simple_hybrid/vector_semantic_hybrid) (Optional)
                     top_k: Integer (Optional)
                     filter: String (Optional)
                     index_asset_id: String (Optional)
                 }
             ]
         }
     }
     temperature: Double (Required)
     top_p: Double (Required)
     response_format: BinaryData (Optional)
     metadata (Required): {
         String: String (Required)
     }
 }

Parameters:

assistantId - The ID of the agent to modify.
updateAgentRequest - The updateAgentRequest parameter.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

represents an agent that can call the model and use tools along with Response<T>.

Applies to