次の方法で共有


ThreadRun Class

  • java.lang.Object
    • com.azure.ai.agents.persistent.models.ThreadRun

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 ThreadRun fromJson(JsonReader jsonReader)

Reads an instance of ThreadRun from the JsonReader.

String getAssistantId()

Get the assistantId property: The ID of the agent associated with the thread this run was performed against.

OffsetDateTime getCancelledAt()

Get the cancelledAt property: The Unix timestamp, in seconds, representing when this was cancelled.

OffsetDateTime getCompletedAt()

Get the completedAt property: The Unix timestamp, in seconds, representing when this completed.

OffsetDateTime getCreatedAt()

Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.

OffsetDateTime getExpiresAt()

Get the expiresAt property: The Unix timestamp, in seconds, representing when this item expires.

OffsetDateTime getFailedAt()

Get the failedAt property: The Unix timestamp, in seconds, representing when this failed.

String getId()

Get the id property: The identifier, which can be referenced in API endpoints.

IncompleteRunDetails getIncompleteDetails()

Get the incompleteDetails property: Details on why the run is incomplete.

String getInstructions()

Get the instructions property: The overridden system instructions used for this agent thread run.

RunError getLastError()

Get the lastError property: The last error, if any, encountered by this agent thread run.

Integer getMaxCompletionTokens()

Get the maxCompletionTokens property: The maximum number of completion tokens specified to have been used over the course of the run.

Integer getMaxPromptTokens()

Get the maxPromptTokens property: The maximum number of prompt tokens specified to have been used over the course of the run.

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.run'.

RequiredAction getRequiredAction()

Get the requiredAction property: The details of the action required for the agent thread run to continue.

BinaryData getResponseFormat()

Get the responseFormat property: The response format of the tool calls used in this run.

OffsetDateTime getStartedAt()

Get the startedAt property: The Unix timestamp, in seconds, representing when this item was started.

RunStatus 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 threadId property: The ID of the thread associated with this run.

BinaryData getToolChoice()

Get the toolChoice property: Controls whether or not and which tool is called by the model.

ToolResources getToolResources()

Get the toolResources property: Override the tools the agent can use for this run.

List<ToolDefinition> 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.

TruncationObject getTruncationStrategy()

Get the truncationStrategy property: The strategy to use for dropping messages as the context windows moves forward.

RunCompletionUsage getUsage()

Get the usage property: Usage statistics related to the run.

boolean isParallelToolCalls()

Get the parallelToolCalls property: Determines if tools can be executed in parallel within the run.

JsonWriter 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:

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:

IOException

- If the deserialized JSON object was missing any required properties.

getAssistantId

public String getAssistantId()

Get the assistantId property: The ID of the agent associated with the thread this run was performed against.

Returns:

the assistantId value.

getCancelledAt

public OffsetDateTime getCancelledAt()

Get the cancelledAt property: The Unix timestamp, in seconds, representing when this was cancelled.

Returns:

the cancelledAt value.

getCompletedAt

public OffsetDateTime getCompletedAt()

Get the completedAt property: The Unix timestamp, in seconds, representing when this completed.

Returns:

the completedAt value.

getCreatedAt

public OffsetDateTime getCreatedAt()

Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.

Returns:

the createdAt value.

getExpiresAt

public OffsetDateTime getExpiresAt()

Get the expiresAt property: The Unix timestamp, in seconds, representing when this item expires.

Returns:

the expiresAt value.

getFailedAt

public OffsetDateTime getFailedAt()

Get the failedAt property: The Unix timestamp, in seconds, representing when this failed.

Returns:

the failedAt value.

getId

public String getId()

Get the id property: The identifier, which can be referenced in API endpoints.

Returns:

the id value.

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:

the incompleteDetails value.

getInstructions

public String getInstructions()

Get the instructions property: The overridden system instructions used for this agent thread run.

Returns:

the instructions value.

getLastError

public RunError getLastError()

Get the lastError property: The last error, if any, encountered by this agent thread run.

Returns:

the lastError value.

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:

the maxCompletionTokens value.

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:

the maxPromptTokens value.

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:

the metadata value.

getModel

public String getModel()

Get the model property: The ID of the model to use.

Returns:

the model value.

getObject

public String getObject()

Get the object property: The object type, which is always 'thread.run'.

Returns:

the object value.

getRequiredAction

public RequiredAction getRequiredAction()

Get the requiredAction property: The details of the action required for the agent thread run to continue.

Returns:

the requiredAction value.

getResponseFormat

public BinaryData getResponseFormat()

Get the responseFormat property: The response format of the tool calls used in this run.

Returns:

the responseFormat value.

getStartedAt

public OffsetDateTime getStartedAt()

Get the startedAt property: The Unix timestamp, in seconds, representing when this item was started.

Returns:

the startedAt value.

getStatus

public RunStatus getStatus()

Get the status property: The status of the agent thread run.

Returns:

the status value.

getTemperature

public Double getTemperature()

Get the temperature property: The sampling temperature used for this run. If not set, defaults to 1.

Returns:

the temperature value.

getThreadId

public String getThreadId()

Get the threadId property: The ID of the thread associated with this run.

Returns:

the threadId value.

getToolChoice

public BinaryData getToolChoice()

Get the toolChoice property: Controls whether or not and which tool is called by the model.

Returns:

the toolChoice value.

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:

the toolResources value.

getTools

public List<ToolDefinition> getTools()

Get the tools property: The overridden enabled tools used for this agent thread run.

Returns:

the tools value.

getTopP

public Double getTopP()

Get the topP property: The nucleus sampling value used for this run. If not set, defaults to 1.

Returns:

the topP value.

getTruncationStrategy

public TruncationObject getTruncationStrategy()

Get the truncationStrategy property: The strategy to use for dropping messages as the context windows moves forward.

Returns:

the truncationStrategy value.

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:

the usage 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

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to