Class OpenAiApi.FunctionTool
java.lang.Object
org.springframework.ai.openai.api.OpenAiApi.FunctionTool
- Enclosing class:
- OpenAiApi
Represents a tool the model may call. Currently, only functions are supported as a
tool.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Function definition.static enum
Create a tool of type 'function' and the given function definition. -
Constructor Summary
ConstructorsConstructorDescriptionFunctionTool
(OpenAiApi.FunctionTool.Function function) Create a tool of type 'function' and the given function definition.FunctionTool
(OpenAiApi.FunctionTool.Type type, OpenAiApi.FunctionTool.Function function) Create a tool of type 'function' and the given function definition. -
Method Summary
Modifier and TypeMethodDescriptiongetType()
void
setFunction
(OpenAiApi.FunctionTool.Function function) void
-
Constructor Details
-
FunctionTool
public FunctionTool() -
FunctionTool
Create a tool of type 'function' and the given function definition.- Parameters:
type
- the tool typefunction
- function definition
-
FunctionTool
Create a tool of type 'function' and the given function definition.- Parameters:
function
- function definition.
-
-
Method Details
-
getType
-
getFunction
-
setType
-
setFunction
-