AIClientModelFactory.ThreadRun Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of ThreadRun.
public static Azure.AI.Projects.ThreadRun ThreadRun (string id = default, string threadId = default, string agentId = default, Azure.AI.Projects.RunStatus status = default, Azure.AI.Projects.RequiredAction requiredAction = default, Azure.AI.Projects.RunError lastError = default, string model = default, string instructions = default, System.Collections.Generic.IEnumerable<Azure.AI.Projects.ToolDefinition> tools = default, DateTimeOffset createdAt = default, DateTimeOffset? expiresAt = default, DateTimeOffset? startedAt = default, DateTimeOffset? completedAt = default, DateTimeOffset? cancelledAt = default, DateTimeOffset? failedAt = default, Azure.AI.Projects.IncompleteRunDetails incompleteDetails = default, Azure.AI.Projects.RunCompletionUsage usage = default, float? temperature = default, float? topP = default, int? maxPromptTokens = default, int? maxCompletionTokens = default, Azure.AI.Projects.TruncationObject truncationStrategy = default, BinaryData toolChoice = default, BinaryData responseFormat = default, System.Collections.Generic.IReadOnlyDictionary<string,string> metadata = default, Azure.AI.Projects.UpdateToolResourcesOptions toolResources = default, bool? parallelToolCalls = default);
static member ThreadRun : string * string * string * Azure.AI.Projects.RunStatus * Azure.AI.Projects.RequiredAction * Azure.AI.Projects.RunError * string * string * seq<Azure.AI.Projects.ToolDefinition> * DateTimeOffset * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Azure.AI.Projects.IncompleteRunDetails * Azure.AI.Projects.RunCompletionUsage * Nullable<single> * Nullable<single> * Nullable<int> * Nullable<int> * Azure.AI.Projects.TruncationObject * BinaryData * BinaryData * System.Collections.Generic.IReadOnlyDictionary<string, string> * Azure.AI.Projects.UpdateToolResourcesOptions * Nullable<bool> -> Azure.AI.Projects.ThreadRun
Public Shared Function ThreadRun (Optional id As String = Nothing, Optional threadId As String = Nothing, Optional agentId As String = Nothing, Optional status As RunStatus = Nothing, Optional requiredAction As RequiredAction = Nothing, Optional lastError As RunError = Nothing, Optional model As String = Nothing, Optional instructions As String = Nothing, Optional tools As IEnumerable(Of ToolDefinition) = Nothing, Optional createdAt As DateTimeOffset = Nothing, Optional expiresAt As Nullable(Of DateTimeOffset) = Nothing, Optional startedAt As Nullable(Of DateTimeOffset) = Nothing, Optional completedAt As Nullable(Of DateTimeOffset) = Nothing, Optional cancelledAt As Nullable(Of DateTimeOffset) = Nothing, Optional failedAt As Nullable(Of DateTimeOffset) = Nothing, Optional incompleteDetails As IncompleteRunDetails = Nothing, Optional usage As RunCompletionUsage = Nothing, Optional temperature As Nullable(Of Single) = Nothing, Optional topP As Nullable(Of Single) = Nothing, Optional maxPromptTokens As Nullable(Of Integer) = Nothing, Optional maxCompletionTokens As Nullable(Of Integer) = Nothing, Optional truncationStrategy As TruncationObject = Nothing, Optional toolChoice As BinaryData = Nothing, Optional responseFormat As BinaryData = Nothing, Optional metadata As IReadOnlyDictionary(Of String, String) = Nothing, Optional toolResources As UpdateToolResourcesOptions = Nothing, Optional parallelToolCalls As Nullable(Of Boolean) = Nothing) As ThreadRun
Parameters
- id
- String
The identifier, which can be referenced in API endpoints.
- threadId
- String
The ID of the thread associated with this run.
- agentId
- String
The ID of the agent associated with the thread this run was performed against.
- status
- RunStatus
The status of the agent thread run.
- requiredAction
- RequiredAction
The details of the action required for the agent thread run to continue. Please note RequiredAction is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include SubmitToolOutputsAction(IEnumerable<RequiredToolCall>).
- lastError
- RunError
The last error, if any, encountered by this agent thread run.
- model
- String
The ID of the model to use.
- instructions
- String
The overridden system instructions used for this agent thread run.
- tools
- IEnumerable<ToolDefinition>
The overridden enabled tools used for this agent thread run. Please note ToolDefinition is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include CodeInterpreterToolDefinition, FileSearchToolDefinition and FunctionToolDefinition.
- createdAt
- DateTimeOffset
The Unix timestamp, in seconds, representing when this object was created.
- expiresAt
- Nullable<DateTimeOffset>
The Unix timestamp, in seconds, representing when this item expires.
- startedAt
- Nullable<DateTimeOffset>
The Unix timestamp, in seconds, representing when this item was started.
- completedAt
- Nullable<DateTimeOffset>
The Unix timestamp, in seconds, representing when this completed.
- cancelledAt
- Nullable<DateTimeOffset>
The Unix timestamp, in seconds, representing when this was cancelled.
- failedAt
- Nullable<DateTimeOffset>
The Unix timestamp, in seconds, representing when this failed.
- incompleteDetails
- IncompleteRunDetails
Details on why the run is incomplete. Will be null
if the run is not incomplete.
- usage
- RunCompletionUsage
Usage statistics related to the run. This value will be null
if the run is not in a terminal state (i.e. in_progress
, queued
, etc.).
The maximum number of prompt tokens specified to have been used over the course of the run.
The maximum number of completion tokens specified to have been used over the course of the run.
- truncationStrategy
- TruncationObject
The strategy to use for dropping messages as the context windows moves forward.
- toolChoice
- BinaryData
Controls whether or not and which tool is called by the model.
- responseFormat
- BinaryData
The response format of the tool calls used in this run.
- metadata
- IReadOnlyDictionary<String,String>
A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
- toolResources
- UpdateToolResourcesOptions
Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis.
Returns
A new ThreadRun instance for mocking.
Applies to
Azure SDK for .NET