PersistentAgentsAsyncClient Class
- java.
lang. Object - com.
azure. ai. agents. persistent. PersistentAgentsAsyncClient
- com.
public final class PersistentAgentsAsyncClient
Initializes a new instance of the asynchronous PersistentAgentsClient type.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Mono<Thread |
createThreadAndRun(CreateThreadAndRunOptions options)
Creates a new agent thread and immediately starts a run using that new thread. |
|
Mono<Response<Binary |
createThreadAndRunWithResponse(BinaryData createThreadAndRunRequest, RequestOptions requestOptions)
Creates a new agent thread and immediately starts a run using that new thread. |
|
Files |
getFilesAsyncClient()
Gets an instance of Files |
|
Messages |
getMessagesAsyncClient()
Gets an instance of Messages |
|
Persistent |
getPersistentAgentsAdministrationAsyncClient()
Gets an instance of Persistent |
|
Runs |
getRunsAsyncClient()
Gets an instance of Runs |
|
Threads |
getThreadsAsyncClient()
Gets an instance of Threads |
|
Vector |
getVectorStoresAsyncClient()
Gets an instance of Vector |
Methods inherited from java.lang.Object
Method Details
createThreadAndRun
public Mono<ThreadRun> createThreadAndRun(CreateThreadAndRunOptions options)
Creates a new agent thread and immediately starts a run using that new thread.
Parameters:
Returns:
createThreadAndRunWithResponse
public Mono<Response<BinaryData>> createThreadAndRunWithResponse(BinaryData createThreadAndRunRequest, RequestOptions requestOptions)
Creates a new agent thread and immediately starts a run using that new thread.
Request Body Schema
{
assistant_id: String (Required)
thread (Optional): {
messages (Optional): [
(Optional){
role: String(user/assistant) (Required)
content: BinaryData (Required)
attachments (Optional): [
(Optional){
file_id: String (Optional)
data_source (Optional): {
uri: String (Required)
type: String(uri_asset/id_asset) (Required)
}
tools (Required): [
BinaryData (Required)
]
}
]
metadata (Optional): {
String: String (Required)
}
}
]
tool_resources (Optional): {
code_interpreter (Optional): {
file_ids (Optional): [
String (Optional)
]
data_sources (Optional): [
(recursive schema, see above)
]
}
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)
}
]
}
}
metadata (Optional): {
String: String (Required)
}
}
model: String (Optional)
instructions: String (Optional)
tools (Optional): [
(Optional){
type: String (Required)
}
]
tool_resources (Optional): (recursive schema, see tool_resources above)
stream: Boolean (Optional)
temperature: Double (Optional)
top_p: Double (Optional)
max_prompt_tokens: Integer (Optional)
max_completion_tokens: Integer (Optional)
truncation_strategy (Optional): {
type: String(auto/last_messages) (Required)
last_messages: Integer (Optional)
}
tool_choice: BinaryData (Optional)
response_format: BinaryData (Optional)
parallel_tool_calls: Boolean (Optional)
metadata (Optional): {
String: String (Required)
}
}
Response Body Schema
{
id: String (Required)
object: String (Required)
thread_id: String (Required)
assistant_id: String (Required)
status: String(queued/in_progress/requires_action/cancelling/cancelled/failed/completed/expired) (Required)
required_action (Optional): {
type: String (Required)
}
last_error (Required): {
code: String (Required)
message: String (Required)
}
model: String (Required)
instructions: String (Required)
tools (Required): [
(Required){
type: String (Required)
}
]
created_at: long (Required)
expires_at: Long (Required)
started_at: Long (Required)
completed_at: Long (Required)
cancelled_at: Long (Required)
failed_at: Long (Required)
incomplete_details (Required): {
reason: String(max_completion_tokens/max_prompt_tokens) (Required)
}
usage (Required): {
completion_tokens: long (Required)
prompt_tokens: long (Required)
total_tokens: long (Required)
}
temperature: Double (Optional)
top_p: Double (Optional)
max_prompt_tokens: Integer (Required)
max_completion_tokens: Integer (Required)
truncation_strategy (Required): {
type: String(auto/last_messages) (Required)
last_messages: Integer (Optional)
}
tool_choice: BinaryData (Required)
response_format: BinaryData (Required)
metadata (Required): {
String: 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)
}
]
}
}
parallel_tool_calls: boolean (Required)
}
Parameters:
Returns:
getFilesAsyncClient
public FilesAsyncClient getFilesAsyncClient()
Gets an instance of FilesAsyncClient class.
Returns:
getMessagesAsyncClient
public MessagesAsyncClient getMessagesAsyncClient()
Gets an instance of MessagesAsyncClient class.
Returns:
getPersistentAgentsAdministrationAsyncClient
public PersistentAgentsAdministrationAsyncClient getPersistentAgentsAdministrationAsyncClient()
Gets an instance of PersistentAgentsAdministrationAsyncClient class.
Returns:
getRunsAsyncClient
public RunsAsyncClient getRunsAsyncClient()
Gets an instance of RunsAsyncClient class.
Returns:
getThreadsAsyncClient
public ThreadsAsyncClient getThreadsAsyncClient()
Gets an instance of ThreadsAsyncClient class.
Returns:
getVectorStoresAsyncClient
public VectorStoresAsyncClient getVectorStoresAsyncClient()
Gets an instance of VectorStoresAsyncClient class.
Returns: