Package de.espirit.firstspirit.ai
Interface GenerativeAIAgent
- All Superinterfaces:
GenerativeAIConnector
Agent for performing generative AI requests.
This agent operates on the configured default connector, any usage may request specific API connector using
getConnector(String)
if necessary.- Since:
- 5.2.240708
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SpecialistType<GenerativeAIAgent>
Agent for performing generative AI requests. -
Method Summary
Modifier and TypeMethodDescription@NotNull GenerativeAIConnector
getConnector
(@NotNull String plugin) Request a specific AI API connector to perform requests with.Methods inherited from interface de.espirit.firstspirit.ai.GenerativeAIConnector
isAvailable, openStream, request, request
-
Field Details
-
TYPE
Agent for performing generative AI requests.- Since:
- 5.2.240708
-
-
Method Details
-
getConnector
@NotNull @NotNull GenerativeAIConnector getConnector(@NotNull @NotNull String plugin) throws NoSuchElementException Request a specific AI API connector to perform requests with. Make sure to checkGenerativeAIConnector.isAvailable()
on the returned connector instance before making any AI requests.- Parameters:
plugin
- The name of theGenerativeAIConnectorPlugin
.- Returns:
- An instance for performing requests in the context of the given plugin.
- Throws:
NoSuchElementException
- If there is no such plugin.- Since:
- 5.2.240708
-