Class FileSearchTool
-
- All Implemented Interfaces:
public final class FileSearchTool
A 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 class
FileSearchTool.Builder
A builder for FileSearchTool.
public final class
FileSearchTool.Filters
A filter to apply.
public final class
FileSearchTool.RankingOptions
Ranking 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. 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.Builder
toBuilder()
final FileSearchTool
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static FileSearchTool.Builder
builder()
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.
-
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()
-
-
-
-