Class FileSearchTool
-
- All Implemented Interfaces:
public final class FileSearchToolA tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classFileSearchTool.BuilderA builder for FileSearchTool.
public final classFileSearchTool.FiltersA filter to apply based on file attributes.
public final classFileSearchTool.RankingOptionsRanking options for search.
-
Method Summary
Modifier and Type Method Description final JsonValue_type()The type of the file search tool. final List<String>vectorStoreIds()The IDs of the vector stores to search. final Optional<FileSearchTool.Filters>filters()A filter to apply based on file attributes. final Optional<Long>maxNumResults()The maximum number of results to return. final Optional<FileSearchTool.RankingOptions>rankingOptions()Ranking options for search. final JsonField<List<String>>_vectorStoreIds()Returns the raw JSON value of vectorStoreIds. final JsonField<FileSearchTool.Filters>_filters()Returns the raw JSON value of filters. final JsonField<Long>_maxNumResults()Returns the raw JSON value of maxNumResults. final JsonField<FileSearchTool.RankingOptions>_rankingOptions()Returns the raw JSON value of rankingOptions. final Map<String, JsonValue>_additionalProperties()final FileSearchTool.BuildertoBuilder()final FileSearchToolvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static FileSearchTool.Builderbuilder()Returns a mutable builder for constructing an instance of FileSearchTool. -
-
Method Detail
-
_type
final JsonValue _type()
The type of the file search tool. Always
file_search.Expected to always return the following:
JsonValue.from("file_search")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
vectorStoreIds
final List<String> vectorStoreIds()
The IDs of the vector stores to search.
-
filters
final Optional<FileSearchTool.Filters> filters()
A filter to apply based on file attributes.
-
maxNumResults
final Optional<Long> maxNumResults()
The maximum number of results to return. This number should be between 1 and 50 inclusive.
-
rankingOptions
final Optional<FileSearchTool.RankingOptions> rankingOptions()
Ranking options for search.
-
_vectorStoreIds
final JsonField<List<String>> _vectorStoreIds()
Returns the raw JSON value of vectorStoreIds.
Unlike vectorStoreIds, this method doesn't throw if the JSON field has an unexpected type.
-
_filters
final JsonField<FileSearchTool.Filters> _filters()
Returns the raw JSON value of filters.
Unlike filters, this method doesn't throw if the JSON field has an unexpected type.
-
_maxNumResults
final JsonField<Long> _maxNumResults()
Returns the raw JSON value of maxNumResults.
Unlike maxNumResults, this method doesn't throw if the JSON field has an unexpected type.
-
_rankingOptions
final JsonField<FileSearchTool.RankingOptions> _rankingOptions()
Returns the raw JSON value of rankingOptions.
Unlike rankingOptions, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final FileSearchTool.Builder toBuilder()
-
validate
final FileSearchTool validate()
-
builder
final static FileSearchTool.Builder builder()
Returns a mutable builder for constructing an instance of FileSearchTool.
The following fields are required:
.vectorStoreIds()
-
-
-
-