PredictionGuardEmbeddings
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 shows how to use the Prediction Guard embeddings integration with Langchain. This integration supports text and images, separately or together in matched pairs.
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 with
import os
os.environ["PREDICTIONGUARD_API_KEY"] = "<Prediction Guard API Key"
Installation
%pip install --upgrade --quiet langchain-predictionguard
Instantiation
First, install the Prediction Guard and LangChain packages. Then, set the required env vars and set up package imports.
from langchain_predictionguard import PredictionGuardEmbeddings
embeddings = PredictionGuardEmbeddings(model="bridgetower-large-itm-mlm-itc")
Prediction Guard embeddings generation supports both text and images. This integration includes that support spread across various functions.