This script is a pipe that uses the NotDiamond API to automatically route prompts to the most optimal language model based on a specified tradeoff (cost, performance, or latency).
It analyzes the user's prompt and selects the best-fit model from a predefined list, then seamlessly passes the request to the chosen model.
- Place the Script: Copy the
notdiamond_auto_router.pyfile into the/data/pipesdirectory inside the installation volume. - Install Dependencies: The system will automatically detect the
requirements: httpxline in the script's docstring and install the necessary Python package. A restart may be required.