Interface DocumentBlock.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<DocumentBlock.Builder,DocumentBlock>,SdkBuilder<DocumentBlock.Builder,DocumentBlock>,SdkPojo
- Enclosing class:
- DocumentBlock
@Mutable @NotThreadSafe public static interface DocumentBlock.Builder extends SdkPojo, CopyableBuilder<DocumentBlock.Builder,DocumentBlock>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default DocumentBlock.Buildercitations(Consumer<CitationsConfig.Builder> citations)Configuration settings that control how citations should be generated for this specific document.DocumentBlock.Buildercitations(CitationsConfig citations)Configuration settings that control how citations should be generated for this specific document.DocumentBlock.Buildercontext(String context)Contextual information about how the document should be processed or interpreted by the model when generating citations.DocumentBlock.Builderformat(String format)The format of a document, or its extension.DocumentBlock.Builderformat(DocumentFormat format)The format of a document, or its extension.DocumentBlock.Buildername(String name)A name for the document.default DocumentBlock.Buildersource(Consumer<DocumentSource.Builder> source)Contains the content of the document.DocumentBlock.Buildersource(DocumentSource source)Contains the content of the document.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
format
DocumentBlock.Builder format(String format)
The format of a document, or its extension.
- Parameters:
format- The format of a document, or its extension.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
DocumentFormat,DocumentFormat
-
format
DocumentBlock.Builder format(DocumentFormat format)
The format of a document, or its extension.
- Parameters:
format- The format of a document, or its extension.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
DocumentFormat,DocumentFormat
-
name
DocumentBlock.Builder name(String name)
A name for the document. The name can only contain the following characters:
-
Alphanumeric characters
-
Whitespace characters (no more than one in a row)
-
Hyphens
-
Parentheses
-
Square brackets
This field is vulnerable to prompt injections, because the model might inadvertently interpret it as instructions. Therefore, we recommend that you specify a neutral name.
- Parameters:
name- A name for the document. The name can only contain the following characters:-
Alphanumeric characters
-
Whitespace characters (no more than one in a row)
-
Hyphens
-
Parentheses
-
Square brackets
This field is vulnerable to prompt injections, because the model might inadvertently interpret it as instructions. Therefore, we recommend that you specify a neutral name.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
source
DocumentBlock.Builder source(DocumentSource source)
Contains the content of the document.
- Parameters:
source- Contains the content of the document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
source
default DocumentBlock.Builder source(Consumer<DocumentSource.Builder> source)
Contains the content of the document.
This is a convenience method that creates an instance of theDocumentSource.Builderavoiding the need to create one manually viaDocumentSource.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosource(DocumentSource).- Parameters:
source- a consumer that will call methods onDocumentSource.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
source(DocumentSource)
-
context
DocumentBlock.Builder context(String context)
Contextual information about how the document should be processed or interpreted by the model when generating citations.
- Parameters:
context- Contextual information about how the document should be processed or interpreted by the model when generating citations.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
citations
DocumentBlock.Builder citations(CitationsConfig citations)
Configuration settings that control how citations should be generated for this specific document.
- Parameters:
citations- Configuration settings that control how citations should be generated for this specific document.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
citations
default DocumentBlock.Builder citations(Consumer<CitationsConfig.Builder> citations)
Configuration settings that control how citations should be generated for this specific document.
This is a convenience method that creates an instance of theCitationsConfig.Builderavoiding the need to create one manually viaCitationsConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocitations(CitationsConfig).- Parameters:
citations- a consumer that will call methods onCitationsConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
citations(CitationsConfig)
-
-