PersistentAgentsAdministrationClient Class
- java.
lang. Object - com.
azure. ai. agents. persistent. PersistentAgentsAdministrationClient
- com.
public final class PersistentAgentsAdministrationClient
Initializes a new instance of the synchronous PersistentAgentsAdministration type.
Method Summary
Methods inherited from java.lang.Object
Method Details
createAgent
public PersistentAgent createAgent(CreateAgentOptions options)
Creates a new agent.
Parameters:
Returns:
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:
Returns:
deleteAgent
public void deleteAgent(String assistantId)
Deletes an agent.
Parameters:
getAgent
public PersistentAgent getAgent(String assistantId)
Retrieves an existing agent.
Parameters:
Returns:
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:
Returns:
listAgents
public PagedIterable<PersistentAgent> listAgents()
Gets a list of agents that were previously created.
Returns:
listAgents
public PagedIterable<PersistentAgent> listAgents(Integer limit, ListSortOrder order, String after, String before)
Gets a list of agents that were previously created.
Parameters:
Returns:
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:
Returns:
updateAgent
public PersistentAgent updateAgent(UpdateAgentOptions options)
Modifies an existing agent.
Parameters:
Returns:
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:
Returns: