Package com.aispect.agents.data
Class ImageProcessAgent
- All Implemented Interfaces:
AiAgentFilter,AiExceptionProxy<Object,,String> AiExecutionProxy<Object,,String> AiPostExecutionProxy<Object,,String> AiPreExecutionProxy<Object>,AiUnitAgentHandler<Object,String>
image processing Agent,Used to demonstrate multi-modality, multi-parameters and diverse parameter transfer.
Receive: model name (String)、image (Base64 String or byte array)、instruction (String)。 Should Agent By intercepting the user, the image data and instructions are sent to the multi-modal large model for processing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(AiInvocationContext<Object> ctx) Execute the core logic of image processing.Methods inherited from class com.aispect.agent.core.AbstractUnitAgent
doFilter, getAiOperations, onException, postExecute, preExecute, shouldProcess
-
Constructor Details
-
ImageProcessAgent
public ImageProcessAgent()
-
-
Method Details
-
execute
Execute the core logic of image processing.- Specified by:
executein interfaceAiExecutionProxy<Object,String> - Overrides:
executein classAbstractUnitAgent<Object,String> - Parameters:
ctx- AI Execution context, the expected parameters include the image byte array and the user's specific processing instructions- Returns:
- The description or content of the image processing results of the large model
- Throws:
AiSpectException- If an error occurs during processing or AI Interface call exception
-