次の方法で共有


PersistentAgentsAsyncClient Class

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

public final class PersistentAgentsAsyncClient

Initializes a new instance of the asynchronous PersistentAgentsClient type.

Method Summary

Modifier and Type Method and Description
Mono<ThreadRun> createThreadAndRun(CreateThreadAndRunOptions options)

Creates a new agent thread and immediately starts a run using that new thread.

Mono<Response<BinaryData>> createThreadAndRunWithResponse(BinaryData createThreadAndRunRequest, RequestOptions requestOptions)

Creates a new agent thread and immediately starts a run using that new thread.

FilesAsyncClient getFilesAsyncClient()

Gets an instance of FilesAsyncClient class.

MessagesAsyncClient getMessagesAsyncClient()

Gets an instance of MessagesAsyncClient class.

PersistentAgentsAdministrationAsyncClient getPersistentAgentsAdministrationAsyncClient()

Gets an instance of PersistentAgentsAdministrationAsyncClient class.

RunsAsyncClient getRunsAsyncClient()

Gets an instance of RunsAsyncClient class.

ThreadsAsyncClient getThreadsAsyncClient()

Gets an instance of ThreadsAsyncClient class.

VectorStoresAsyncClient getVectorStoresAsyncClient()

Gets an instance of VectorStoresAsyncClient class.

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:

options - Options for createThreadAndRun API.

Returns:

data representing a single evaluation run of an agent thread on successful completion of Mono.

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:

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

Returns:

data representing a single evaluation run of an agent thread along with Response<T> on successful completion of Mono.

getFilesAsyncClient

public FilesAsyncClient getFilesAsyncClient()

Gets an instance of FilesAsyncClient class.

Returns:

an instance of FilesAsyncClient class.

getMessagesAsyncClient

public MessagesAsyncClient getMessagesAsyncClient()

Gets an instance of MessagesAsyncClient class.

Returns:

an instance of MessagesAsyncClient class.

getPersistentAgentsAdministrationAsyncClient

public PersistentAgentsAdministrationAsyncClient getPersistentAgentsAdministrationAsyncClient()

Gets an instance of PersistentAgentsAdministrationAsyncClient class.

Returns:

an instance of PersistentAgentsAdministrationAsyncClient class.

getRunsAsyncClient

public RunsAsyncClient getRunsAsyncClient()

Gets an instance of RunsAsyncClient class.

Returns:

an instance of RunsAsyncClient class.

getThreadsAsyncClient

public ThreadsAsyncClient getThreadsAsyncClient()

Gets an instance of ThreadsAsyncClient class.

Returns:

an instance of ThreadsAsyncClient class.

getVectorStoresAsyncClient

public VectorStoresAsyncClient getVectorStoresAsyncClient()

Gets an instance of VectorStoresAsyncClient class.

Returns:

an instance of VectorStoresAsyncClient class.

Applies to