ThreadRun Class
- java.
lang. Object - com.
azure. ai. agents. persistent. models. ThreadRun
- com.
Implements
public final class ThreadRun
implements JsonSerializable<ThreadRun>
Data representing a single evaluation run of an agent thread.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Thread |
fromJson(JsonReader jsonReader)
Reads an instance of Thread |
| String |
getAssistantId()
Get the assistant |
|
Offset |
getCancelledAt()
Get the cancelled |
|
Offset |
getCompletedAt()
Get the completed |
|
Offset |
getCreatedAt()
Get the created |
|
Offset |
getExpiresAt()
Get the expires |
|
Offset |
getFailedAt()
Get the failed |
| String |
getId()
Get the id property: The identifier, which can be referenced in API endpoints. |
|
Incomplete |
getIncompleteDetails()
Get the incomplete |
| String |
getInstructions()
Get the instructions property: The overridden system instructions used for this agent thread run. |
|
Run |
getLastError()
Get the last |
| Integer |
getMaxCompletionTokens()
Get the max |
| Integer |
getMaxPromptTokens()
Get the max |
| Map<String,String> |
getMetadata()
Get the metadata property: 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. |
| String |
getModel()
Get the model property: The ID of the model to use. |
| String |
getObject()
Get the object property: The object type, which is always 'thread. |
|
Required |
getRequiredAction()
Get the required |
|
Binary |
getResponseFormat()
Get the response |
|
Offset |
getStartedAt()
Get the started |
|
Run |
getStatus()
Get the status property: The status of the agent thread run. |
| Double |
getTemperature()
Get the temperature property: The sampling temperature used for this run. |
| String |
getThreadId()
Get the thread |
|
Binary |
getToolChoice()
Get the tool |
|
Tool |
getToolResources()
Get the tool |
|
List<Tool |
getTools()
Get the tools property: The overridden enabled tools used for this agent thread run. |
| Double |
getTopP()
Get the topP property: The nucleus sampling value used for this run. |
|
Truncation |
getTruncationStrategy()
Get the truncation |
|
Run |
getUsage()
Get the usage property: Usage statistics related to the run. |
| boolean |
isParallelToolCalls()
Get the parallel |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static ThreadRun fromJson(JsonReader jsonReader)
Reads an instance of ThreadRun from the JsonReader.
Parameters:
Returns:
Throws:
getAssistantId
public String getAssistantId()
Get the assistantId property: The ID of the agent associated with the thread this run was performed against.
Returns:
getCancelledAt
public OffsetDateTime getCancelledAt()
Get the cancelledAt property: The Unix timestamp, in seconds, representing when this was cancelled.
Returns:
getCompletedAt
public OffsetDateTime getCompletedAt()
Get the completedAt property: The Unix timestamp, in seconds, representing when this completed.
Returns:
getCreatedAt
public OffsetDateTime getCreatedAt()
Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.
Returns:
getExpiresAt
public OffsetDateTime getExpiresAt()
Get the expiresAt property: The Unix timestamp, in seconds, representing when this item expires.
Returns:
getFailedAt
public OffsetDateTime getFailedAt()
Get the failedAt property: The Unix timestamp, in seconds, representing when this failed.
Returns:
getId
public String getId()
Get the id property: The identifier, which can be referenced in API endpoints.
Returns:
getIncompleteDetails
public IncompleteRunDetails getIncompleteDetails()
Get the incompleteDetails property: Details on why the run is incomplete. Will be `null` if the run is not incomplete.
Returns:
getInstructions
public String getInstructions()
Get the instructions property: The overridden system instructions used for this agent thread run.
Returns:
getLastError
public RunError getLastError()
Get the lastError property: The last error, if any, encountered by this agent thread run.
Returns:
getMaxCompletionTokens
public Integer getMaxCompletionTokens()
Get the maxCompletionTokens property: The maximum number of completion tokens specified to have been used over the course of the run.
Returns:
getMaxPromptTokens
public Integer getMaxPromptTokens()
Get the maxPromptTokens property: The maximum number of prompt tokens specified to have been used over the course of the run.
Returns:
getMetadata
public Map<String,String> getMetadata()
Get the metadata property: 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.
Returns:
getModel
public String getModel()
Get the model property: The ID of the model to use.
Returns:
getObject
public String getObject()
Get the object property: The object type, which is always 'thread.run'.
Returns:
getRequiredAction
public RequiredAction getRequiredAction()
Get the requiredAction property: The details of the action required for the agent thread run to continue.
Returns:
getResponseFormat
public BinaryData getResponseFormat()
Get the responseFormat property: The response format of the tool calls used in this run.
Returns:
getStartedAt
public OffsetDateTime getStartedAt()
Get the startedAt property: The Unix timestamp, in seconds, representing when this item was started.
Returns:
getStatus
public RunStatus getStatus()
Get the status property: The status of the agent thread run.
Returns:
getTemperature
public Double getTemperature()
Get the temperature property: The sampling temperature used for this run. If not set, defaults to 1.
Returns:
getThreadId
public String getThreadId()
Get the threadId property: The ID of the thread associated with this run.
Returns:
getToolChoice
public BinaryData getToolChoice()
Get the toolChoice property: Controls whether or not and which tool is called by the model.
Returns:
getToolResources
public ToolResources getToolResources()
Get the toolResources property: Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis.
Returns:
getTools
public List<ToolDefinition> getTools()
Get the tools property: The overridden enabled tools used for this agent thread run.
Returns:
getTopP
public Double getTopP()
Get the topP property: The nucleus sampling value used for this run. If not set, defaults to 1.
Returns:
getTruncationStrategy
public TruncationObject getTruncationStrategy()
Get the truncationStrategy property: The strategy to use for dropping messages as the context windows moves forward.
Returns:
getUsage
public RunCompletionUsage getUsage()
Get the usage property: 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.).
Returns:
isParallelToolCalls
public boolean isParallelToolCalls()
Get the parallelToolCalls property: Determines if tools can be executed in parallel within the run.
Returns: