Introduction

The Beanshell Enhancer allows you to run custom Java code to modify or enhance the final AI response before it is returned to the user. Unlike prompt plugins that influence the input to the AI, Enhancers operate after the AI has generated a response, giving you full control to transform, format, filter, or even enrich the output.

It leverages the power of Beanshell scripting (Java syntax) to handle complex operations beyond what’s possible with standard configuration.

Get started

How to use it

To use the Beanshell Element:

Adding the Beanshell enhancer

  1. Locate the Beanshell element under the Enhancer Plugin section.
  2. Drag and drop the File element into the Drop an enhancer here section.

Configure form properties

To properly integrate and configure the Beanshell, set the following fields: