Skip to main content
Use a pre-hook to transform the input of an Agent before it is presented to the LLM.

Code

input_transformation_pre_hook.py

Usage

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run example

Save the code above as input_transformation_pre_hook.py, then run: