public class UploadDocumentAsyncShrinkRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
Integer |
chunkOverlap
The size of data that is overlapped between consecutive chunks.
|
Integer |
chunkSize
example:
250
|
String |
collection
This parameter is required.
|
String |
DBInstanceId
This parameter is required.
|
String |
documentLoaderName
The name of the document loader.
|
Boolean |
dryRun
Specifies whether to perform only document understanding and chunking, but not vectorization and storage.
|
String |
fileName
The file name of the document.
|
String |
fileUrl
This parameter is required.
|
String |
metadataShrink
The metadata.
|
String |
namespace
example:
mynamespace
|
String |
namespacePassword
This parameter is required.
|
Long |
ownerId |
String |
regionId
The region ID of the instance.
|
String |
separatorsShrink
The separators that are used to split large amounts of data.
|
String |
textSplitterName
The name of the splitter.
|
Boolean |
zhTitleEnhance
Specifies whether to enable title enhancement.
|
| 构造器和说明 |
|---|
UploadDocumentAsyncShrinkRequest() |
@NameInMap(value="ChunkOverlap") public Integer chunkOverlap
The size of data that is overlapped between consecutive chunks. The maximum value of this parameter cannot be greater than the value of the ChunkSize parameter.
example:This parameter is used to prevent context missing that may occur due to data truncation. For example, when you upload a long text, you can retain specific overlapped text content between consecutive chunks to better understand the context.
50
@NameInMap(value="ChunkSize") public Integer chunkSize
250
@NameInMap(value="Collection") public String collection
This parameter is required.
example:document
@NameInMap(value="DBInstanceId") public String DBInstanceId
This parameter is required.
example:gp-bp12ga6v69h86****
@NameInMap(value="DocumentLoaderName") public String documentLoaderName
The name of the document loader. You do not need to specify this parameter. A document loader is automatically specified based on the file extension. Valid values:
.html.md.pdf.pdf.pdf.pdf (with the text-image association feature).json.csv.png, .jpg, .jpeg, and .bmp.eml, .msg, .rst, .txt, .docx, .epub, .odt, .pptx, and .tsvPyMuPDFLoader
@NameInMap(value="DryRun") public Boolean dryRun
Specifies whether to perform only document understanding and chunking, but not vectorization and storage. Default value: false.
example:You can set this parameter to true, check the chunking effect, and then perform optimization if needed.
false
@NameInMap(value="FileName") public String fileName
The file name of the document.
We recommend that you add an extension to the file name. Examples: .json, .md, and .pdf. If you do not add an extension, the default loader designed for unstructured data is used.
If an image file is involved, the file name must contain an extension. The following extensions are supported: .bmp, .jpg, .jpeg, .png, and .tiff.
You can use a compressed package to upload images. The package file name must contain an extension. Supported package file extensions: .tar, .gz, and .zip.
This parameter is required.
example:mydoc.txt
@NameInMap(value="FileUrl") public String fileUrl
This parameter is required.
example:@NameInMap(value="Metadata") public String metadataShrink
The metadata. The value of this parameter must be the same as the Metadata parameter that is specified when you call the CreateDocumentCollection operation.
@NameInMap(value="Namespace") public String namespace
mynamespace
@NameInMap(value="NamespacePassword") public String namespacePassword
This parameter is required.
example:testpassword
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="RegionId") public String regionId
The region ID of the instance.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="Separators") public String separatorsShrink
The separators that are used to split large amounts of data.
This is an important parameter that determines the chunking effect. This parameter is related to the splitter that is specified by the TextSplitterName parameter.
In most cases, you do not need to specify this parameter. The server assigns separators based on the value of the TextSplitterName parameter.
@NameInMap(value="TextSplitterName") public String textSplitterName
The name of the splitter. Valid values:
["\\n\\n","\\n", "。|!|?", "\\.\\s|\\!\\s|\\?\\s", ";|;\\s", ",|,\\s"] as separators by default, and uses regular expressions to match text.["\\n\\n", "\\n", " ", ""] as separators by default. The splitter supports splitting code in languages such as C++, Go, Java, JS, PHP, Proto, Python, RST, Ruby, Rust, Scala, Swift, Markdown, LaTeX, HTML, Sol, and C Sharp.\\n\\n as separators by default and uses the en_core_web_sm model of spaCy. The splitter can obtain better splitting effect.[("#", "head1"), ("##", "head2"), ("###", "head3"), ("####", "head4")] format. The splitter is suitable for Markdown text.ChineseRecursiveTextSplitter
@NameInMap(value="ZhTitleEnhance") public Boolean zhTitleEnhance
Specifies whether to enable title enhancement.
example:You can determine the title text, mark the text in the metadata, and then combine the text with the upper-level title to implement text enhancement.
false
public static UploadDocumentAsyncShrinkRequest build(Map<String,?> map) throws Exception
Exceptionpublic UploadDocumentAsyncShrinkRequest setChunkOverlap(Integer chunkOverlap)
public Integer getChunkOverlap()
public UploadDocumentAsyncShrinkRequest setChunkSize(Integer chunkSize)
public Integer getChunkSize()
public UploadDocumentAsyncShrinkRequest setCollection(String collection)
public String getCollection()
public UploadDocumentAsyncShrinkRequest setDBInstanceId(String DBInstanceId)
public String getDBInstanceId()
public UploadDocumentAsyncShrinkRequest setDocumentLoaderName(String documentLoaderName)
public String getDocumentLoaderName()
public UploadDocumentAsyncShrinkRequest setDryRun(Boolean dryRun)
public Boolean getDryRun()
public UploadDocumentAsyncShrinkRequest setFileName(String fileName)
public String getFileName()
public UploadDocumentAsyncShrinkRequest setFileUrl(String fileUrl)
public String getFileUrl()
public UploadDocumentAsyncShrinkRequest setMetadataShrink(String metadataShrink)
public String getMetadataShrink()
public UploadDocumentAsyncShrinkRequest setNamespace(String namespace)
public String getNamespace()
public UploadDocumentAsyncShrinkRequest setNamespacePassword(String namespacePassword)
public String getNamespacePassword()
public UploadDocumentAsyncShrinkRequest setOwnerId(Long ownerId)
public Long getOwnerId()
public UploadDocumentAsyncShrinkRequest setRegionId(String regionId)
public String getRegionId()
public UploadDocumentAsyncShrinkRequest setSeparatorsShrink(String separatorsShrink)
public String getSeparatorsShrink()
public UploadDocumentAsyncShrinkRequest setTextSplitterName(String textSplitterName)
public String getTextSplitterName()
public UploadDocumentAsyncShrinkRequest setZhTitleEnhance(Boolean zhTitleEnhance)
public Boolean getZhTitleEnhance()
Copyright © 2024. All rights reserved.