public class QueryContentShrinkRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
collection
This parameter is required.
|
String |
content |
String |
DBInstanceId
This parameter is required.
|
String |
fileName
example:
test.jpg
|
String |
fileUrl
example:
https://xx/myImage.jpg
|
String |
filter
The filter condition that is used to query data.
|
String |
hybridSearch
The two-way retrieval algorithm.
|
String |
hybridSearchArgsShrink
The parameters of the two-way retrieval algorithm.
|
Boolean |
includeFileUrl
Specifies whether to return the URL of the document.
|
String |
includeMetadataFields
The metadata fields to be returned.
|
Boolean |
includeVector
example:
true
|
String |
metrics
example:
cosine
|
String |
namespace
The name of the namespace.
|
String |
namespacePassword
This parameter is required.
|
Long |
ownerId |
String |
recallWindowShrink
The recall window.
|
String |
regionId
This parameter is required.
|
Double |
rerankFactor
example:
2
|
Integer |
topK
example:
10
|
Boolean |
useFullTextRetrieval
Specifies whether to use full-text search to implement two-way retrieval.
|
| 构造器和说明 |
|---|
QueryContentShrinkRequest() |
@NameInMap(value="Collection") public String collection
This parameter is required.
example:document
@NameInMap(value="Content") public String content
@NameInMap(value="DBInstanceId") public String DBInstanceId
This parameter is required.
example:gp-xxxxxxxxx
@NameInMap(value="FileName") public String fileName
test.jpg
@NameInMap(value="FileUrl") public String fileUrl
@NameInMap(value="Filter") public String filter
The filter condition that is used to query data. Specify the parameter in the WHERE clause format. The parameter is an expression that returns a Boolean value of TRUE or FALSE. The parameter can contain comparison operators, such as Equal To (=), Not Equal To (<> or !=), Greater Than (>), Less Than (<), Greater Than or Equal To (>=), and Less Than or Equal To (<=), logical operators, such as AND, OR, and NOT, and keywords, such as IN, BETWEEN, and LIKE.
title = \"test\"
@NameInMap(value="HybridSearch") public String hybridSearch
The two-way retrieval algorithm. This parameter is empty by default, which specifies that scores of vector search and full-text search are directly compared and sorted without additional weighting or adjustments.
Valid values:
RRF
@NameInMap(value="HybridSearchArgs") public String hybridSearchArgsShrink
The parameters of the two-way retrieval algorithm. The following parameters are supported:
1/(k+rank_i) formula. The constant k is a positive integer that is greater than 1.{
"RRF": {
"k": 60
}
}
alpha * vector_score + (1-alpha) * text_score formula. The alpha parameter specifies the proportion of the vector search score and the full-text search score and ranges from 0 to 1. A value of 0 specifies full-text search and a value of 1 specifies vector search.{
"Weight": {
"alpha": 0.5
}
}
@NameInMap(value="IncludeFileUrl") public Boolean includeFileUrl
Specifies whether to return the URL of the document. Default value: false.
example:false
@NameInMap(value="IncludeMetadataFields") public String includeMetadataFields
The metadata fields to be returned. Separate multiple fields with commas (,). This parameter is empty by default.
example:title,page
@NameInMap(value="IncludeVector") public Boolean includeVector
true
@NameInMap(value="Metrics") public String metrics
cosine
@NameInMap(value="Namespace") public String namespace
The name of the namespace. Default value: public.
example:You can call the CreateNamespace operation to create a namespace and call the ListNamespaces operation to query a list of namespaces.
mynamespace
@NameInMap(value="NamespacePassword") public String namespacePassword
This parameter is required.
example:testpassword
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="RecallWindow") public String recallWindowShrink
The recall window. If you specify this parameter, the context of the search result is returned. Format: List\<A, B>. Valid values: -10<=A<=0 and 0<=B<=10.
We recommend that you specify this parameter if the source document is segmented into large numbers of pieces and you may fail to obtain the context.
The context of the search result is retrieved based on the recall window after the search result is reranked.
@NameInMap(value="RegionId") public String regionId
This parameter is required.
example:cn-hangzhou
@NameInMap(value="RerankFactor") public Double rerankFactor
2
@NameInMap(value="TopK") public Integer topK
10
@NameInMap(value="UseFullTextRetrieval") public Boolean useFullTextRetrieval
Specifies whether to use full-text search to implement two-way retrieval. The default value is false, which specifies that only vector search is used.
example:true
public static QueryContentShrinkRequest build(Map<String,?> map) throws Exception
Exceptionpublic QueryContentShrinkRequest setCollection(String collection)
public String getCollection()
public QueryContentShrinkRequest setContent(String content)
public String getContent()
public QueryContentShrinkRequest setDBInstanceId(String DBInstanceId)
public String getDBInstanceId()
public QueryContentShrinkRequest setFileName(String fileName)
public String getFileName()
public QueryContentShrinkRequest setFileUrl(String fileUrl)
public String getFileUrl()
public QueryContentShrinkRequest setFilter(String filter)
public String getFilter()
public QueryContentShrinkRequest setHybridSearch(String hybridSearch)
public String getHybridSearch()
public QueryContentShrinkRequest setHybridSearchArgsShrink(String hybridSearchArgsShrink)
public String getHybridSearchArgsShrink()
public QueryContentShrinkRequest setIncludeFileUrl(Boolean includeFileUrl)
public Boolean getIncludeFileUrl()
public QueryContentShrinkRequest setIncludeMetadataFields(String includeMetadataFields)
public String getIncludeMetadataFields()
public QueryContentShrinkRequest setIncludeVector(Boolean includeVector)
public Boolean getIncludeVector()
public QueryContentShrinkRequest setMetrics(String metrics)
public String getMetrics()
public QueryContentShrinkRequest setNamespace(String namespace)
public String getNamespace()
public QueryContentShrinkRequest setNamespacePassword(String namespacePassword)
public String getNamespacePassword()
public QueryContentShrinkRequest setOwnerId(Long ownerId)
public Long getOwnerId()
public QueryContentShrinkRequest setRecallWindowShrink(String recallWindowShrink)
public String getRecallWindowShrink()
public QueryContentShrinkRequest setRegionId(String regionId)
public String getRegionId()
public QueryContentShrinkRequest setRerankFactor(Double rerankFactor)
public Double getRerankFactor()
public QueryContentShrinkRequest setTopK(Integer topK)
public Integer getTopK()
public QueryContentShrinkRequest setUseFullTextRetrieval(Boolean useFullTextRetrieval)
public Boolean getUseFullTextRetrieval()
Copyright © 2024. All rights reserved.