Class ThreadRun
java.lang.Object
com.azure.ai.agents.persistent.models.ThreadRun
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ThreadRun>
Data representing a single evaluation run of an agent thread.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadRunfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ThreadRun from the JsonReader.Get the assistantId property: The ID of the agent associated with the thread this run was performed against.Get the cancelledAt property: The Unix timestamp, in seconds, representing when this was cancelled.Get the completedAt property: The Unix timestamp, in seconds, representing when this completed.Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.Get the expiresAt property: The Unix timestamp, in seconds, representing when this item expires.Get the failedAt property: The Unix timestamp, in seconds, representing when this failed.getId()Get the id property: The identifier, which can be referenced in API endpoints.Get the incompleteDetails property: Details on why the run is incomplete.Get the instructions property: The overridden system instructions used for this agent thread run.Get the lastError property: The last error, if any, encountered by this agent thread run.Get the maxCompletionTokens property: The maximum number of completion tokens specified to have been used over the course of the run.Get the maxPromptTokens property: The maximum number of prompt tokens specified to have been used over the course of the run.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.getModel()Get the model property: The ID of the model to use.Get the object property: The object type, which is always 'thread.run'.Get the requiredAction property: The details of the action required for the agent thread run to continue.com.azure.core.util.BinaryDataGet the responseFormat property: The response format of the tool calls used in this run.Get the startedAt property: The Unix timestamp, in seconds, representing when this item was started.Get the status property: The status of the agent thread run.Get the temperature property: The sampling temperature used for this run.Get the threadId property: The ID of the thread associated with this run.com.azure.core.util.BinaryDataGet the toolChoice property: Controls whether or not and which tool is called by the model.Get the toolResources property: Override the tools the agent can use for this run.getTools()Get the tools property: The overridden enabled tools used for this agent thread run.getTopP()Get the topP property: The nucleus sampling value used for this run.Get the truncationStrategy property: The strategy to use for dropping messages as the context windows moves forward.getUsage()Get the usage property: Usage statistics related to the run.booleanGet the parallelToolCalls property: Determines if tools can be executed in parallel within the run.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
getId
Get the id property: The identifier, which can be referenced in API endpoints.- Returns:
- the id value.
-
getObject
Get the object property: The object type, which is always 'thread.run'.- Returns:
- the object value.
-
getThreadId
Get the threadId property: The ID of the thread associated with this run.- Returns:
- the threadId value.
-
getAssistantId
Get the assistantId property: The ID of the agent associated with the thread this run was performed against.- Returns:
- the assistantId value.
-
getStatus
Get the status property: The status of the agent thread run.- Returns:
- the status value.
-
getRequiredAction
Get the requiredAction property: The details of the action required for the agent thread run to continue.- Returns:
- the requiredAction value.
-
getLastError
Get the lastError property: The last error, if any, encountered by this agent thread run.- Returns:
- the lastError value.
-
getModel
Get the model property: The ID of the model to use.- Returns:
- the model value.
-
getInstructions
Get the instructions property: The overridden system instructions used for this agent thread run.- Returns:
- the instructions value.
-
getTools
Get the tools property: The overridden enabled tools used for this agent thread run.- Returns:
- the tools value.
-
getCreatedAt
Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.- Returns:
- the createdAt value.
-
getExpiresAt
Get the expiresAt property: The Unix timestamp, in seconds, representing when this item expires.- Returns:
- the expiresAt value.
-
getStartedAt
Get the startedAt property: The Unix timestamp, in seconds, representing when this item was started.- Returns:
- the startedAt value.
-
getCompletedAt
Get the completedAt property: The Unix timestamp, in seconds, representing when this completed.- Returns:
- the completedAt value.
-
getCancelledAt
Get the cancelledAt property: The Unix timestamp, in seconds, representing when this was cancelled.- Returns:
- the cancelledAt value.
-
getFailedAt
Get the failedAt property: The Unix timestamp, in seconds, representing when this failed.- Returns:
- the failedAt value.
-
getIncompleteDetails
Get the incompleteDetails property: Details on why the run is incomplete. Will be `null` if the run is not incomplete.- Returns:
- the incompleteDetails value.
-
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:
- the usage value.
-
getTemperature
Get the temperature property: The sampling temperature used for this run. If not set, defaults to 1.- Returns:
- the temperature value.
-
getTopP
Get the topP property: The nucleus sampling value used for this run. If not set, defaults to 1.- Returns:
- the topP value.
-
getMaxPromptTokens
Get the maxPromptTokens property: The maximum number of prompt tokens specified to have been used over the course of the run.- Returns:
- the maxPromptTokens value.
-
getMaxCompletionTokens
Get the maxCompletionTokens property: The maximum number of completion tokens specified to have been used over the course of the run.- Returns:
- the maxCompletionTokens value.
-
getTruncationStrategy
Get the truncationStrategy property: The strategy to use for dropping messages as the context windows moves forward.- Returns:
- the truncationStrategy value.
-
getToolChoice
public com.azure.core.util.BinaryData getToolChoice()Get the toolChoice property: Controls whether or not and which tool is called by the model.- Returns:
- the toolChoice value.
-
getResponseFormat
public com.azure.core.util.BinaryData getResponseFormat()Get the responseFormat property: The response format of the tool calls used in this run.- Returns:
- the responseFormat value.
-
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:
- the metadata value.
-
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:
- the toolResources value.
-
isParallelToolCalls
public boolean isParallelToolCalls()Get the parallelToolCalls property: Determines if tools can be executed in parallel within the run.- Returns:
- the parallelToolCalls value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ThreadRun>- Throws:
IOException
-
fromJson
Reads an instance of ThreadRun from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ThreadRun if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ThreadRun.
-