Package de.espirit.firstspirit.ai
Interface GenerativeAIAgentConnector
- All Superinterfaces:
GenerativeAIConnector
- All Known Subinterfaces:
GenerativeAIAgent
@Experimental
@NonExtendable
public interface GenerativeAIAgentConnector
extends GenerativeAIConnector
GenerativeAIConnector provided by a GenerativeAIAgent extending the functionality of a
GenerativeAIConnectorPlugin-based AI integration.- Since:
- 5.2.250908
-
Method Summary
Modifier and TypeMethodDescription@NotNull GenerativeAIFunctionRequestCreates a newGenerativeAIFunctionRequestfor a function-based generative AI request.<T> @NotNull Optional<T>Convenience method to make a request with a structured output format.Methods inherited from interface de.espirit.firstspirit.ai.GenerativeAIConnector
isAvailable, openStream, request, request
-
Method Details
-
request
@NotNull <T> @NotNull Optional<T> request(@NotNull @NotNull Request request, @NotNull @NotNull Class<T> type) throws IOException Convenience method to make a request with a structured output format.NOTE: This method is intended to be used for simple objects and use-cases, for any more advanced scenario you should consider using libraries like Jackson supporting fully functional JSON schema generation.
- Type Parameters:
T- The expected output type.- Parameters:
request- The request descriptor.type- The expected output.- Returns:
- The response as structured output.
- Throws:
IOException- If the request failed for some reason.- Since:
- 5.2.251303
- See Also:
-
createFunctionRequest
Creates a newGenerativeAIFunctionRequestfor a function-based generative AI request.- Returns:
- The function request.
- Since:
- 5.2.250908
-