Package com.aispect.agents.data
Class ImageStoryAgent
- All Implemented Interfaces:
AiAgentFilter,AiExceptionProxy<Object,,String> AiExecutionProxy<Object,,String> AiPostExecutionProxy<Object,,String> AiPreExecutionProxy<Object>,AiUnitAgentHandler<Object,String>
Tell stories through pictures Agent。
Should Agent Receive a picture and use multi-modal large models to generate an interesting story based on the picture content. It can handle method interception with image input.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(AiInvocationContext<Object> ctx) Execute the logic of looking at pictures and telling stories.Methods inherited from class com.aispect.agent.core.AbstractUnitAgent
doFilter, getAiOperations, onException, postExecute, preExecute, shouldProcess
-
Constructor Details
-
ImageStoryAgent
public ImageStoryAgent()
-
-
Method Details
-
execute
Execute the logic of looking at pictures and telling stories.- Specified by:
executein interfaceAiExecutionProxy<Object,String> - Overrides:
executein classAbstractUnitAgent<Object,String> - Parameters:
ctx- AI Execution context, the first parameter is expected to be a byte array of the image, and the second parameter (optional) is the prompt instruction- Returns:
- Story text generated by large model based on pictures
- Throws:
AiSpectException- if AI The call failed or the parameters did not meet expectations
-