Package org.openapitools.client.model
Class SearchChunkData
- java.lang.Object
-
- org.openapitools.client.model.SearchChunkData
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-03-29T12:34:27.506198300-05:00[America/Chicago]", comments="Generator version: 7.4.0") public class SearchChunkData extends Object
SearchChunkData
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSearchChunkData.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_DATE_BIASstatic StringSERIALIZED_NAME_FILTERSstatic StringSERIALIZED_NAME_GET_COLLISIONSstatic StringSERIALIZED_NAME_HIGHLIGHT_DELIMITERSstatic StringSERIALIZED_NAME_HIGHLIGHT_RESULTSstatic StringSERIALIZED_NAME_PAGEstatic StringSERIALIZED_NAME_PAGE_SIZEstatic StringSERIALIZED_NAME_QUERYstatic StringSERIALIZED_NAME_SCORE_THRESHOLDstatic StringSERIALIZED_NAME_SEARCH_TYPEstatic StringSERIALIZED_NAME_USE_WEIGHTS
-
Constructor Summary
Constructors Constructor Description SearchChunkData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchChunkDataaddHighlightDelimitersItem(String highlightDelimitersItem)SearchChunkDatadateBias(Boolean dateBias)booleanequals(Object o)SearchChunkDatafilters(ChunkFilter filters)static SearchChunkDatafromJson(String jsonString)Create an instance of SearchChunkData given an JSON stringSearchChunkDatagetCollisions(Boolean getCollisions)BooleangetDateBias()Set date_bias to true to bias search results towards more recent chunks.@Valid ChunkFiltergetFilters()Get filtersBooleangetGetCollisions()Set get_collisions to true to get the collisions for each chunk.List<String>getHighlightDelimiters()Set highlight_delimiters to a list of strings to use as delimiters for highlighting.BooleangetHighlightResults()Set highlight_results to true to highlight the results.@Min(0L) LonggetPage()Page of chunks to fetch.@Min(0L) LonggetPageSize()Page size is the number of chunks to fetch.@NotNull StringgetQuery()Query is the search query.FloatgetScoreThreshold()Set score_threshold to a float to filter out chunks with a score below the threshold.@NotNull StringgetSearchType()Can be either \"semantic\", \"fulltext\", or \"hybrid\".BooleangetUseWeights()Set use_weights to true to use the weights of the chunks in the result set in order to sort them.inthashCode()SearchChunkDatahighlightDelimiters(List<String> highlightDelimiters)SearchChunkDatahighlightResults(Boolean highlightResults)SearchChunkDatapage(Long page)SearchChunkDatapageSize(Long pageSize)SearchChunkDataquery(String query)SearchChunkDatascoreThreshold(Float scoreThreshold)SearchChunkDatasearchType(String searchType)voidsetDateBias(Boolean dateBias)voidsetFilters(ChunkFilter filters)voidsetGetCollisions(Boolean getCollisions)voidsetHighlightDelimiters(List<String> highlightDelimiters)voidsetHighlightResults(Boolean highlightResults)voidsetPage(Long page)voidsetPageSize(Long pageSize)voidsetQuery(String query)voidsetScoreThreshold(Float scoreThreshold)voidsetSearchType(String searchType)voidsetUseWeights(Boolean useWeights)StringtoJson()Convert an instance of SearchChunkData to an JSON stringStringtoString()SearchChunkDatauseWeights(Boolean useWeights)static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_DATE_BIAS
public static final String SERIALIZED_NAME_DATE_BIAS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FILTERS
public static final String SERIALIZED_NAME_FILTERS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_GET_COLLISIONS
public static final String SERIALIZED_NAME_GET_COLLISIONS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_HIGHLIGHT_DELIMITERS
public static final String SERIALIZED_NAME_HIGHLIGHT_DELIMITERS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_HIGHLIGHT_RESULTS
public static final String SERIALIZED_NAME_HIGHLIGHT_RESULTS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PAGE
public static final String SERIALIZED_NAME_PAGE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PAGE_SIZE
public static final String SERIALIZED_NAME_PAGE_SIZE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_QUERY
public static final String SERIALIZED_NAME_QUERY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SCORE_THRESHOLD
public static final String SERIALIZED_NAME_SCORE_THRESHOLD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SEARCH_TYPE
public static final String SERIALIZED_NAME_SEARCH_TYPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_USE_WEIGHTS
public static final String SERIALIZED_NAME_USE_WEIGHTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
dateBias
public SearchChunkData dateBias(Boolean dateBias)
-
getDateBias
@Nullable public Boolean getDateBias()
Set date_bias to true to bias search results towards more recent chunks. This will work best in hybrid search mode.- Returns:
- dateBias
-
setDateBias
public void setDateBias(Boolean dateBias)
-
filters
public SearchChunkData filters(ChunkFilter filters)
-
getFilters
@Nullable @Valid public @Valid ChunkFilter getFilters()
Get filters- Returns:
- filters
-
setFilters
public void setFilters(ChunkFilter filters)
-
getCollisions
public SearchChunkData getCollisions(Boolean getCollisions)
-
getGetCollisions
@Nullable public Boolean getGetCollisions()
Set get_collisions to true to get the collisions for each chunk. This will only apply if environment variable COLLISIONS_ENABLED is set to true.- Returns:
- getCollisions
-
setGetCollisions
public void setGetCollisions(Boolean getCollisions)
-
highlightDelimiters
public SearchChunkData highlightDelimiters(List<String> highlightDelimiters)
-
addHighlightDelimitersItem
public SearchChunkData addHighlightDelimitersItem(String highlightDelimitersItem)
-
getHighlightDelimiters
@Nullable public List<String> getHighlightDelimiters()
Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"].- Returns:
- highlightDelimiters
-
highlightResults
public SearchChunkData highlightResults(Boolean highlightResults)
-
getHighlightResults
@Nullable public Boolean getHighlightResults()
Set highlight_results to true to highlight the results. If not specified, this defaults to true.- Returns:
- highlightResults
-
setHighlightResults
public void setHighlightResults(Boolean highlightResults)
-
page
public SearchChunkData page(Long page)
-
getPage
@Nullable @Min(0L) public @Min(0L) Long getPage()
Page of chunks to fetch. Each page is 10 chunks. Support for custom page size is coming soon. minimum: 0- Returns:
- page
-
setPage
public void setPage(Long page)
-
pageSize
public SearchChunkData pageSize(Long pageSize)
-
getPageSize
@Nullable @Min(0L) public @Min(0L) Long getPageSize()
Page size is the number of chunks to fetch. This can be used to fetch more than 10 chunks at a time. minimum: 0- Returns:
- pageSize
-
setPageSize
public void setPageSize(Long pageSize)
-
query
public SearchChunkData query(String query)
-
getQuery
@Nonnull @NotNull public @NotNull String getQuery()
Query is the search query. This can be any string. The query will be used to create an embedding vector and/or SPLADE vector which will be used to find the result set.- Returns:
- query
-
setQuery
public void setQuery(String query)
-
scoreThreshold
public SearchChunkData scoreThreshold(Float scoreThreshold)
-
getScoreThreshold
@Nullable public Float getScoreThreshold()
Set score_threshold to a float to filter out chunks with a score below the threshold.- Returns:
- scoreThreshold
-
setScoreThreshold
public void setScoreThreshold(Float scoreThreshold)
-
searchType
public SearchChunkData searchType(String searchType)
-
getSearchType
@Nonnull @NotNull public @NotNull String getSearchType()
Can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\" will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \"semantic\" will pull in one page (10 chunks) of the nearest cosine distant vectors. \"fulltext\" will pull in one page (10 chunks) of full-text results based on SPLADE.- Returns:
- searchType
-
setSearchType
public void setSearchType(String searchType)
-
useWeights
public SearchChunkData useWeights(Boolean useWeights)
-
getUseWeights
@Nullable public Boolean getUseWeights()
Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true.- Returns:
- useWeights
-
setUseWeights
public void setUseWeights(Boolean useWeights)
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOExceptionValidates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to SearchChunkData
-
fromJson
public static SearchChunkData fromJson(String jsonString) throws IOException
Create an instance of SearchChunkData given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of SearchChunkData
- Throws:
IOException- if the JSON string is invalid with respect to SearchChunkData
-
toJson
public String toJson()
Convert an instance of SearchChunkData to an JSON string- Returns:
- JSON string
-
-