Prediction Guard는 민감한 데이터를 보호하고, 일반적인 AI 오작동을 방지하며, 저렴한 하드웨어에서 실행되는 안전하고 확장 가능한 GenAI 플랫폼입니다.
Overview
Integration details
이 integration은 LangChain과 함께 Prediction Guard embeddings integration을 사용하는 방법을 보여줍니다. 이 integration은 텍스트와 이미지를 개별적으로 또는 매칭된 쌍으로 함께 지원합니다.Setup
Prediction Guard 모델에 액세스하려면 여기에서 문의하여 Prediction Guard API key를 받고 시작하세요.Credentials
key를 받으면 다음과 같이 설정할 수 있습니다Installation
Instantiation
먼저 Prediction Guard와 LangChain 패키지를 설치합니다. 그런 다음 필요한 환경 변수를 설정하고 패키지 import를 설정합니다.Indexing and Retrieval
Direct Usage
vectorstore와 retriever 구현은embeddings.embed_documents(...)와 embeddings.embed_query(...)를 호출하여 from_texts 및 retrieval invoke 작업에 사용되는 텍스트로부터 embeddings를 생성합니다.
이러한 메서드는 다음 명령으로 직접 호출할 수 있습니다.
Embed single texts
Embed multiple texts
Embed single images
Embed multiple images
Embed single text-image pairs
Embed multiple text-image pairs
API reference
모든 PredictionGuardEmbeddings 기능 및 구성에 대한 자세한 문서는 API reference를 확인하세요: python.langchain.com/api_reference/community/embeddings/langchain_community.embeddings.predictionguard.PredictionGuardEmbeddings.htmlConnect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.