Package de.espirit.firstspirit.ai
Interface GenerativeAIFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback for a specific
Function
used for a generative AI request.- Since:
- 5.2.250908
-
Method Summary
Modifier and TypeMethodDescription@Nullable Serializable
perform
(@NotNull GenerativeAIFunctionArguments arguments) Implementation of a previously specifiedFunction
.
-
Method Details
-
perform
Implementation of a previously specifiedFunction
. The AI expects the function to return aString
, even if the result is a JSON object. For convenience the API will try to convert the returned object to an appropriate JSON string type, which may not be supported for some complex Java object types.- Parameters:
arguments
- The arguments specified by the AI.- Returns:
- The result object.
- Since:
- 5.2.250908
-