Package de.espirit.firstspirit.ai
Interface GenerativeAIFunctionRequest.EvaluatedResponse
- All Known Subinterfaces:
GenerativeAIFunctionRequest.EvaluatedResponseStream
- Enclosing interface:
- GenerativeAIFunctionRequest
public static interface GenerativeAIFunctionRequest.EvaluatedResponse
Evaluated response of the generative AI, potentially containing function call requests.
- Since:
- 5.2.250908
-
Method Summary
Modifier and TypeMethodDescription@NotNull Request
Creates a new request using the previously evaluated function calls.Returns a list of function calls requested by the AI.@NotNull Response
The response object returned by the generative AI.@NotNull Optional<TokenUsage>
Returns information about the combined token usage for the current function calling chain.
-
Method Details
-
getResponse
The response object returned by the generative AI.NOTE: To retrieve a combined token usage of all preceding requests use
getTokenUsage()
instead of retrieving it from the returned response usingResponse.getTokenUsage()
.- Returns:
- The response object.
- Since:
- 5.2.250908
-
getTokenUsage
Returns information about the combined token usage for the current function calling chain.- Returns:
- The combined token usage information, if available.
- Since:
- 5.2.251104
-
getFunctionCallHandles
Returns a list of function calls requested by the AI.- Returns:
- The list of function calls.
- Since:
- 5.2.250908
-
createRequest
Creates a new request using the previously evaluated function calls. Any skipped function call will not be contained in the resulting request. Usually the caller of this method should make sure to perform all function calls.- Returns:
- The new request to be used with the contextual
GenerativeAIFunctionRequest
. - Since:
- 5.2.250908
-