Record Class MistralAiApi.FunctionTool
java.lang.Object
java.lang.Record
org.springframework.ai.mistralai.api.MistralAiApi.FunctionTool
- Record Components:
type- The type of the tool. Currently, only 'function' is supported.function- The function definition.
- Enclosing class:
MistralAiApi
public static record MistralAiApi.FunctionTool(MistralAiApi.FunctionTool.Type type, MistralAiApi.FunctionTool.Function function)
extends Record
Represents a tool the model may call. Currently, only functions are supported as a
tool.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordFunction definition.static enumCreate a tool of type 'function' and the given function definition. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a tool of type 'function' and the given function definition.Creates an instance of aFunctionToolrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FunctionTool
Create a tool of type 'function' and the given function definition.- Parameters:
function- function definition.
-
FunctionTool
public FunctionTool(MistralAiApi.FunctionTool.Type type, MistralAiApi.FunctionTool.Function function) Creates an instance of aFunctionToolrecord class.
-
-
Method Details
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-