Language

AgentOptimizationJobCandidates.GetCandidates Method

Definition

Overloads

Name Description
GetCandidates(String, IEnumerable<AgentOptimizationCandidateExpand>, Nullable<Int32>, Nullable<AgentListOrder>, String, String, CancellationToken)

Lists candidates for the given optimization job with cursor pagination, including the original baseline and generated candidates. Each output.mutations item identifies a changed attribute by type; mutation value fields are omitted unless the client passes expand=mutations.

GetCandidates(String, IEnumerable<AgentOptimizationCandidateExpand>, Nullable<Int32>, String, String, String, RequestOptions)

[Protocol Method] Lists candidates for the given optimization job with cursor pagination, including the original baseline and generated candidates. Each output.mutations item identifies a changed attribute by type; mutation value fields are omitted unless the client passes expand=mutations.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

GetCandidates(String, IEnumerable<AgentOptimizationCandidateExpand>, Nullable<Int32>, Nullable<AgentListOrder>, String, String, CancellationToken)

Source:
AgentOptimizationJobCandidates.cs

Lists candidates for the given optimization job with cursor pagination, including the original baseline and generated candidates. Each output.mutations item identifies a changed attribute by type; mutation value fields are omitted unless the client passes expand=mutations.

public virtual System.ClientModel.CollectionResult<Azure.AI.Projects.Agents.AgentOptimizationCandidate> GetCandidates(string jobId, System.Collections.Generic.IEnumerable<Azure.AI.Projects.Agents.AgentOptimizationCandidateExpand> expand = default, int? limit = default, Azure.AI.Projects.Agents.AgentListOrder? order = default, string after = default, string before = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetCandidates : string * seq<Azure.AI.Projects.Agents.AgentOptimizationCandidateExpand> * Nullable<int> * Nullable<Azure.AI.Projects.Agents.AgentListOrder> * string * string * System.Threading.CancellationToken -> System.ClientModel.CollectionResult<Azure.AI.Projects.Agents.AgentOptimizationCandidate>
override this.GetCandidates : string * seq<Azure.AI.Projects.Agents.AgentOptimizationCandidateExpand> * Nullable<int> * Nullable<Azure.AI.Projects.Agents.AgentListOrder> * string * string * System.Threading.CancellationToken -> System.ClientModel.CollectionResult<Azure.AI.Projects.Agents.AgentOptimizationCandidate>
Public Overridable Function GetCandidates (jobId As String, Optional expand As IEnumerable(Of AgentOptimizationCandidateExpand) = Nothing, Optional limit As Nullable(Of Integer) = Nothing, Optional order As Nullable(Of AgentListOrder) = Nothing, Optional after As String = Nothing, Optional before As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As CollectionResult(Of AgentOptimizationCandidate)

Parameters

jobId
String

The ID of the parent optimization job.

expand
IEnumerable<AgentOptimizationCandidateExpand>

Comma-separated list of expand keys. Pass mutations to populate mutation value fields; omit to receive mutation items containing only type. Additional expand keys may be added in future previews.

limit
Nullable<Int32>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

order
Nullable<AgentListOrder>

Sort order by the candidate started_at timestamp.

after
String

Candidate-ID cursor identifying the last item from the previous page.

before
String

Candidate-ID cursor identifying the first item from the following page.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

jobId is null.

jobId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

GetCandidates(String, IEnumerable<AgentOptimizationCandidateExpand>, Nullable<Int32>, String, String, String, RequestOptions)

Source:
AgentOptimizationJobCandidates.cs

[Protocol Method] Lists candidates for the given optimization job with cursor pagination, including the original baseline and generated candidates. Each output.mutations item identifies a changed attribute by type; mutation value fields are omitted unless the client passes expand=mutations.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.ClientModel.Primitives.CollectionResult GetCandidates(string jobId, System.Collections.Generic.IEnumerable<Azure.AI.Projects.Agents.AgentOptimizationCandidateExpand> expand, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options);
abstract member GetCandidates : string * seq<Azure.AI.Projects.Agents.AgentOptimizationCandidateExpand> * Nullable<int> * string * string * string * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.Primitives.CollectionResult
override this.GetCandidates : string * seq<Azure.AI.Projects.Agents.AgentOptimizationCandidateExpand> * Nullable<int> * string * string * string * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.Primitives.CollectionResult
Public Overridable Function GetCandidates (jobId As String, expand As IEnumerable(Of AgentOptimizationCandidateExpand), limit As Nullable(Of Integer), order As String, after As String, before As String, options As RequestOptions) As CollectionResult

Parameters

jobId
String

The ID of the parent optimization job.

expand
IEnumerable<AgentOptimizationCandidateExpand>

Comma-separated list of expand keys. Pass mutations to populate mutation value fields; omit to receive mutation items containing only type. Additional expand keys may be added in future previews.

limit
Nullable<Int32>

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

order
String

Sort order by the candidate started_at timestamp.

after
String

Candidate-ID cursor identifying the last item from the previous page.

before
String

Candidate-ID cursor identifying the first item from the following page.

options
RequestOptions

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

jobId is null.

jobId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to