Interface CodeInterpreterResult.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<CodeInterpreterResult.Builder,,CodeInterpreterResult> SdkBuilder<CodeInterpreterResult.Builder,,CodeInterpreterResult> SdkPojo
- All Known Subinterfaces:
DefaultResult.Builder
- Enclosing class:
CodeInterpreterResult
-
Method Summary
Modifier and TypeMethodDescriptioncontent(Collection<ContentBlock> content) The textual content of the execution result.content(Consumer<ContentBlock.Builder>... content) The textual content of the execution result.content(ContentBlock... content) The textual content of the execution result.Indicates whether the result represents an error.default CodeInterpreterResult.BuilderstructuredContent(Consumer<ToolResultStructuredContent.Builder> structuredContent) The structured content of the execution result.structuredContent(ToolResultStructuredContent structuredContent) The structured content of the execution result.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
content
The textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.
- Parameters:
content- The textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
content
The textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.
- Parameters:
content- The textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
content
The textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.
This is a convenience method that creates an instance of theContentBlock.Builderavoiding the need to create one manually viaContentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocontent(List<ContentBlock>).- Parameters:
content- a consumer that will call methods onContentBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
structuredContent
The structured content of the execution result. This includes additional metadata about the execution, such as execution time, memory usage, and structured representations of output data. The format depends on the specific code interpreter and execution context.
- Parameters:
structuredContent- The structured content of the execution result. This includes additional metadata about the execution, such as execution time, memory usage, and structured representations of output data. The format depends on the specific code interpreter and execution context.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
structuredContent
default CodeInterpreterResult.Builder structuredContent(Consumer<ToolResultStructuredContent.Builder> structuredContent) The structured content of the execution result. This includes additional metadata about the execution, such as execution time, memory usage, and structured representations of output data. The format depends on the specific code interpreter and execution context.
This is a convenience method that creates an instance of theToolResultStructuredContent.Builderavoiding the need to create one manually viaToolResultStructuredContent.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tostructuredContent(ToolResultStructuredContent).- Parameters:
structuredContent- a consumer that will call methods onToolResultStructuredContent.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
isError
Indicates whether the result represents an error. If true, the content contains error messages or exception information. If false, the content contains successful execution results.
- Parameters:
isError- Indicates whether the result represents an error. If true, the content contains error messages or exception information. If false, the content contains successful execution results.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-