Class ThreadRun
java.lang.Object
com.azure.ai.openai.assistants.models.ThreadRun
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ThreadRun>
Data representing a single evaluation run of an assistant thread.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadRun
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ThreadRun from the JsonReader.Get the assistantId property: The ID of the assistant 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 assistant thread run.Get the lastError property: The last error, if any, encountered by this assistant 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 assistant thread run to continue.Get 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 assistant 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.Get the toolChoice property: Controls whether or not and which tool is called by the model.getTools()
Get the tools property: The overridden enabled tools used for this assistant 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.boolean
Get the parallelToolCalls property: Whether to enable parallel function calling during tool use.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 assistant associated with the thread this run was performed against.- Returns:
- the assistantId value.
-
getStatus
Get the status property: The status of the assistant thread run.- Returns:
- the status value.
-
getRequiredAction
Get the requiredAction property: The details of the action required for the assistant thread run to continue.- Returns:
- the requiredAction value.
-
getLastError
Get the lastError property: The last error, if any, encountered by this assistant 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 assistant thread run.- Returns:
- the instructions value.
-
getTools
Get the tools property: The overridden enabled tools used for this assistant 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.
-
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.
-
toJson
- Specified by:
toJson
in 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.
-
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.
-
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.
-
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
Get the toolChoice property: Controls whether or not and which tool is called by the model.- Returns:
- the toolChoice value.
-
getResponseFormat
Get the responseFormat property: The response format of the tool calls used in this run.- Returns:
- the responseFormat value.
-
isParallelToolCalls
public boolean isParallelToolCalls()Get the parallelToolCalls property: Whether to enable parallel function calling during tool use.- Returns:
- the parallelToolCalls value.
-