All Classes and Interfaces
Class
Description
This annotation is used to mark the method as an action which can be called by AI
Action Risk , all medium risk aciton will need one human verification, high will need two
All Types of actions implemented so far
use this annotation to mark the loader as active
This is the key class in creating all the AI related action.
Marker interface for executors
Multi Cloud AI platform
The AnthropicTransformer class implements the PromptTransformer interface and provides methods for transforming prompts into Java POJOs and JSON using Anthropic's chat model.
Detect Bias in response using Zero-shot classification
To detect bias, look for unequal treatment in outputs, analyze the data source,
and challenge the AI's assumptions with follow-up questions.
This Action can be used when you want the AI to get back with answer and if you do not have any
specific action to be performed.
Base class for AI Hallucination and Bias detection
The
ExplainDecision
interface represents a mechanism for AI to explain decisions
regarding a particular prompt text, method name, and reason.Shell, HTTP and Java Methods are supported by default out of the box most of the tasks could be accomplished by the same
however there might be a situation or use case to create custom set of actions *Please note* this is different from Custom actions.
Uses Gemini to check the user prompts
Take actions based on images, compare images, get text from images, get values from images , convert
images into Pojo and Json, get values for specific elements in images,
This class takes a prompt and can build Java Pojo out of it, it could also transform the prompt into json with
name and value
so if you pass it a json like this
String jsonString = "{\"lastName\":\"String\",\"firstName\":\"String\",\"reasonForCalling\":\"String\",\"dateJoined\":\"date\",\"location\":\"String\"}";
and then pass a prompt
I went to the part yesterday and met someone it was so good to meet an old friend.
If guard rails are broken
Interface for checking guard rails
The HallucinationAction class implements the AIAction interface and is designed to detect
potential hallucinations within a generative model's responses.
This is a Generic Http Action Class , it will be built from the config file.
The HttpRestPredictionLoader class is responsible for loading and parsing HTTP REST predictions.
The
HumanInLoop
interface represents a mechanism for allowing human involvement
in a feedback loop process.Maps to Input parameter in the config file, this is the input which will be sent to HTTP request
This is the base class for all the java based executors with common functionality
Create a POJO Object from the response object
This is one of the main classes which is part of processing logic.
Utility class for handling JSON related operations.
LoaderException is a custom exception class that extends Exception.
Simple implementation of Human IN Loop, all it does is logging but in real world this could trigger a full
human validation and return true or false
Uses Json conversion to convert method and java pojo to jsons and then call the openai , your objects have complex
parameters like custom dates etc then its better to pass a custom GSON , otherwise it will use the default gson
The OpenAIPromptTransformer class implements the PromptTransformer interface and provides methods for transforming prompts into Java POJOs and JSON using OpenAI's GPT-3 model.
This annotation is used to mark the class as a Predict group
Just a marker interface to denote that the implementing classes will be predicted by default.
The
PredictionLoader
class is responsible for managing the prediction process
by interacting with various prediction models and loading actions based on predictions.Detecting prompt injection attacks requires vigilance.
The PromptTransformer interface provides methods for transforming prompts into Java POJOs and JSON.
Processes action script line by line , previous result is validated
The SeleniumGeminiProcessor class extends the GeminiV2ActionProcessor and implements the SeleniumProcessor interface.
The SeleniumOpenAIProcessor class extends the OpenAiActionProcessor and implements the SeleniumProcessor interface.
Base class to execute shell commands , these configuration are part of shell_action.yaml.
The
ShellPredictionLoader
class is responsible for loading shell actions from a YAML file
and populating a map of predictions within the application.This will ensure that the action classes are loaded from Spring Applicaiton Context rather than
creating the new one , the advantage of that is we can maintain spring dependency injection for all the beans
Uses Gemini for processing
This will ensure that the action classes are loaded from Spring Applicaiton Context rather than
creating the new one , the advantage of that is we can maintain spring dependency injection for all the beans
Uses OpenAI for processing
The SwaggerPredictionLoader class is responsible for loading and parsing the Swagger configuration.
This class is Zero Shot method designed to assess the consistency of responses generated by a Large Language Model (LLM) and detect potential hallucinations.