Prediction Guard is a secure, scalable GenAI platform that safeguards sensitive data, prevents common AI malfunctions, and runs on affordable hardware.
Overview
Integration details
This integration utilizes the Prediction Guard API, which includes various safeguards and security features.Model features
The models supported by this integration only feature text-generation currently, along with the input and output checks described here.Setup
To access Prediction Guard models, contact us here to get a Prediction Guard API key and get started.Credentials
Once you have a key, you can set it withInstallation
Install the Prediction Guard LangChain integration withInstantiation
Invocation
Streaming
Tool Calling
Prediction Guard has a tool calling API that lets you describe tools and their arguments, which enables the model to return a JSON object with a tool to call and the inputs to that tool. Tool-calling is very useful for building tool-using chains and agents, and for getting structured outputs from models more generally.ChatPredictionGuard.bind_tools()
UsingChatPredictionGuard.bind_tools()
, you can pass in Pydantic classes, dict schemas, and LangChain tools as tools to the model, which are then reformatted to allow for use by the model.