Class CreateRunOptions
java.lang.Object
com.azure.ai.agents.persistent.models.CreateRunOptions
Options for createRun API.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateRunOptions(String threadId, String assistantId) Creates an instance of CreateRunOptions class. -
Method Summary
Modifier and TypeMethodDescriptionGet the additionalInstructions property: Additional instructions to append at the end of the instructions for the run.Get the additionalMessages property: Adds additional messages to the thread before creating the run.Get the assistantId property: The ID of the agent that should run the thread.Get the include property: A list of additional fields to include in the response.Get the instructions property: The overridden system instructions that the agent should use to run the thread.Get the maxCompletionTokens property: The maximum number of completion tokens that may be used over the course of the run.Get the maxPromptTokens property: The maximum number of prompt tokens that may be 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 overridden model name that the agent should use to run the thread.com.azure.core.util.BinaryDataGet the responseFormat property: Specifies the format that the model must output.Get the temperature property: What sampling temperature to use, between 0 and 2.Get the threadId property: Identifier of the thread.com.azure.core.util.BinaryDataGet the toolChoice property: Controls whether or not and which tool is called by the model.getTools()Get the tools property: The overridden list of enabled tools that the agent should use to run the thread.getTopP()Get the topP property: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.Get the truncationStrategy property: The strategy to use for dropping messages as the context windows moves forward.Get the parallelToolCalls property: If `true` functions will run in parallel during tool use.isStream()Get the stream property: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.setAdditionalInstructions(String additionalInstructions) Set the additionalInstructions property: Additional instructions to append at the end of the instructions for the run.setAdditionalMessages(List<ThreadMessageOptions> additionalMessages) Set the additionalMessages property: Adds additional messages to the thread before creating the run.setInclude(List<RunAdditionalFieldList> include) Set the include property: A list of additional fields to include in the response.setInstructions(String instructions) Set the instructions property: The overridden system instructions that the agent should use to run the thread.setMaxCompletionTokens(Integer maxCompletionTokens) Set the maxCompletionTokens property: The maximum number of completion tokens that may be used over the course of the run.setMaxPromptTokens(Integer maxPromptTokens) Set the maxPromptTokens property: The maximum number of prompt tokens that may be used over the course of the run.setMetadata(Map<String, String> metadata) Set 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.Set the model property: The overridden model name that the agent should use to run the thread.setParallelToolCalls(Boolean parallelToolCalls) Set the parallelToolCalls property: If `true` functions will run in parallel during tool use.setResponseFormat(com.azure.core.util.BinaryData responseFormat) Set the responseFormat property: Specifies the format that the model must output.Set the stream property: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.setTemperature(Double temperature) Set the temperature property: What sampling temperature to use, between 0 and 2.setToolChoice(com.azure.core.util.BinaryData toolChoice) Set the toolChoice property: Controls whether or not and which tool is called by the model.setTools(List<ToolDefinition> tools) Set the tools property: The overridden list of enabled tools that the agent should use to run the thread.Set the topP property: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.setTruncationStrategy(TruncationObject truncationStrategy) Set the truncationStrategy property: The strategy to use for dropping messages as the context windows moves forward.
-
Constructor Details
-
CreateRunOptions
Creates an instance of CreateRunOptions class.- Parameters:
threadId- the threadId value to set.assistantId- the assistantId value to set.
-
-
Method Details
-
getThreadId
Get the threadId property: Identifier of the thread.- Returns:
- the threadId value.
-
getInclude
Get the include property: A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.- Returns:
- the include value.
-
setInclude
Set the include property: A list of additional fields to include in the response. Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.- Parameters:
include- the include value to set.- Returns:
- the CreateRunOptions object itself.
-
getAssistantId
Get the assistantId property: The ID of the agent that should run the thread.- Returns:
- the assistantId value.
-
getModel
Get the model property: The overridden model name that the agent should use to run the thread.- Returns:
- the model value.
-
setModel
Set the model property: The overridden model name that the agent should use to run the thread.- Parameters:
model- the model value to set.- Returns:
- the CreateRunOptions object itself.
-
getInstructions
Get the instructions property: The overridden system instructions that the agent should use to run the thread.- Returns:
- the instructions value.
-
setInstructions
Set the instructions property: The overridden system instructions that the agent should use to run the thread.- Parameters:
instructions- the instructions value to set.- Returns:
- the CreateRunOptions object itself.
-
getAdditionalInstructions
Get the additionalInstructions property: Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.- Returns:
- the additionalInstructions value.
-
setAdditionalInstructions
Set the additionalInstructions property: Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.- Parameters:
additionalInstructions- the additionalInstructions value to set.- Returns:
- the CreateRunOptions object itself.
-
getAdditionalMessages
Get the additionalMessages property: Adds additional messages to the thread before creating the run.- Returns:
- the additionalMessages value.
-
setAdditionalMessages
Set the additionalMessages property: Adds additional messages to the thread before creating the run.- Parameters:
additionalMessages- the additionalMessages value to set.- Returns:
- the CreateRunOptions object itself.
-
getTools
Get the tools property: The overridden list of enabled tools that the agent should use to run the thread.- Returns:
- the tools value.
-
setTools
Set the tools property: The overridden list of enabled tools that the agent should use to run the thread.- Parameters:
tools- the tools value to set.- Returns:
- the CreateRunOptions object itself.
-
isStream
Get the stream property: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.- Returns:
- the stream value.
-
setStream
Set the stream property: If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.- Parameters:
stream- the stream value to set.- Returns:
- the CreateRunOptions object itself.
-
getTemperature
Get the temperature property: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.- Returns:
- the temperature value.
-
setTemperature
Set the temperature property: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.- Parameters:
temperature- the temperature value to set.- Returns:
- the CreateRunOptions object itself.
-
getTopP
Get the topP property: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.- Returns:
- the topP value.
-
setTopP
Set the topP property: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.- Parameters:
topP- the topP value to set.- Returns:
- the CreateRunOptions object itself.
-
getMaxPromptTokens
Get the maxPromptTokens property: The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.- Returns:
- the maxPromptTokens value.
-
setMaxPromptTokens
Set the maxPromptTokens property: The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.- Parameters:
maxPromptTokens- the maxPromptTokens value to set.- Returns:
- the CreateRunOptions object itself.
-
getMaxCompletionTokens
Get the maxCompletionTokens property: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.- Returns:
- the maxCompletionTokens value.
-
setMaxCompletionTokens
Set the maxCompletionTokens property: The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.- Parameters:
maxCompletionTokens- the maxCompletionTokens value to set.- Returns:
- the CreateRunOptions object itself.
-
getTruncationStrategy
Get the truncationStrategy property: The strategy to use for dropping messages as the context windows moves forward.- Returns:
- the truncationStrategy value.
-
setTruncationStrategy
Set the truncationStrategy property: The strategy to use for dropping messages as the context windows moves forward.- Parameters:
truncationStrategy- the truncationStrategy value to set.- Returns:
- the CreateRunOptions object itself.
-
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.
-
setToolChoice
Set the toolChoice property: Controls whether or not and which tool is called by the model.- Parameters:
toolChoice- the toolChoice value to set.- Returns:
- the CreateRunOptions object itself.
-
getResponseFormat
public com.azure.core.util.BinaryData getResponseFormat()Get the responseFormat property: Specifies the format that the model must output.- Returns:
- the responseFormat value.
-
setResponseFormat
Set the responseFormat property: Specifies the format that the model must output.- Parameters:
responseFormat- the responseFormat value to set.- Returns:
- the CreateRunOptions object itself.
-
isParallelToolCalls
Get the parallelToolCalls property: If `true` functions will run in parallel during tool use.- Returns:
- the parallelToolCalls value.
-
setParallelToolCalls
Set the parallelToolCalls property: If `true` functions will run in parallel during tool use.- Parameters:
parallelToolCalls- the parallelToolCalls value to set.- Returns:
- the CreateRunOptions object itself.
-
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.
-
setMetadata
Set 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.- Parameters:
metadata- the metadata value to set.- Returns:
- the CreateRunOptions object itself.
-