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 recordstatic final recordEitherToolResources.FileSearch.vectorStoreIdsorToolResources.FileSearch.vectorStoresmust be present, but not both of them. -
Constructor Summary
ConstructorsConstructorDescriptionToolResources(ToolResources.CodeInterpreter codeInterpreter, ToolResources.FileSearch fileSearch) Creates an instance of aToolResourcesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecodeInterpreterrecord component.static ToolResourcescodeInterpreterAndFileSearchToolResources(List<String> fileIds, ToolResources.FileSearch.VectorStore... vectorStores) static ToolResourcescodeInterpreterAndFileSearchToolResources(List<String> fileIds, String... vectorStoreIds) static ToolResourcescodeInterpreterToolResources(List<String> fileIds) final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefileSearchrecord component.static ToolResourcesfileSearchToolResources(ToolResources.FileSearch.VectorStore... vectorStores) static ToolResourcesfileSearchToolResources(String... vectorStoreIds) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ToolResources
public ToolResources(ToolResources.CodeInterpreter codeInterpreter, ToolResources.FileSearch fileSearch) Creates an instance of aToolResourcesrecord class.- Parameters:
codeInterpreter- the value for thecodeInterpreterrecord componentfileSearch- the value for thefileSearchrecord 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 thecodeInterpreterrecord component.- Returns:
- the value of the
codeInterpreterrecord component
-
fileSearch
Returns the value of thefileSearchrecord component.- Returns:
- the value of the
fileSearchrecord component
-