Record Class ToolResources
java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.ToolResources
public record ToolResources(ToolResources.CodeInterpreter codeInterpreter, ToolResources.FileSearch fileSearch)
extends Record
A set of resources that are used by the assistant's tools.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
EitherToolResources.FileSearch.vectorStoreIds
orToolResources.FileSearch.vectorStores
must be present, but not both of them. -
Constructor Summary
ConstructorsConstructorDescriptionToolResources
(ToolResources.CodeInterpreter codeInterpreter, ToolResources.FileSearch fileSearch) Creates an instance of aToolResources
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecodeInterpreter
record component.static ToolResources
codeInterpreterAndFileSearchToolResources
(List<String> fileIds, ToolResources.FileSearch.VectorStore... vectorStores) static ToolResources
codeInterpreterAndFileSearchToolResources
(List<String> fileIds, String... vectorStoreIds) static ToolResources
codeInterpreterToolResources
(List<String> fileIds) final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefileSearch
record component.static ToolResources
fileSearchToolResources
(ToolResources.FileSearch.VectorStore... vectorStores) static ToolResources
fileSearchToolResources
(String... vectorStoreIds) final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ToolResources
public ToolResources(ToolResources.CodeInterpreter codeInterpreter, ToolResources.FileSearch fileSearch) Creates an instance of aToolResources
record class.- Parameters:
codeInterpreter
- the value for thecodeInterpreter
record componentfileSearch
- the value for thefileSearch
record component
-
-
Method Details
-
codeInterpreterToolResources
-
fileSearchToolResources
-
fileSearchToolResources
public static ToolResources fileSearchToolResources(ToolResources.FileSearch.VectorStore... vectorStores) -
codeInterpreterAndFileSearchToolResources
public static ToolResources codeInterpreterAndFileSearchToolResources(List<String> fileIds, String... vectorStoreIds) -
codeInterpreterAndFileSearchToolResources
public static ToolResources codeInterpreterAndFileSearchToolResources(List<String> fileIds, ToolResources.FileSearch.VectorStore... vectorStores) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
codeInterpreter
Returns the value of thecodeInterpreter
record component.- Returns:
- the value of the
codeInterpreter
record component
-
fileSearch
Returns the value of thefileSearch
record component.- Returns:
- the value of the
fileSearch
record component
-