Skip to main content
Google Cloud, Google Gemini 및 기타 Google 제품과의 모든 LangChain 통합입니다.
  1. Google Generative AI (Gemini API & AI Studio): Gemini API를 통해 Google Gemini 모델에 직접 액세스하세요. 빠른 프로토타이핑을 위해 Google AI Studio를 사용하고, langchain-google-genai 패키지로 빠르게 시작할 수 있습니다. 개별 개발자에게는 이 방법이 최선의 시작점인 경우가 많습니다.
  2. Google Cloud (Vertex AI 및 기타 서비스): Google Cloud Platform을 통해 Gemini 모델, Vertex AI Model Garden 및 다양한 클라우드 서비스(데이터베이스, 스토리지, Document AI 등)에 액세스하세요. Vertex AI 모델에는 langchain-google-vertexai 패키지를 사용하고, 기타 클라우드 서비스에는 특정 패키지(예: langchain-google-cloud-sql-pg, langchain-google-community)를 사용하세요. 이미 Google Cloud를 사용 중이거나 MLOps, 특정 모델 튜닝 또는 엔터프라이즈 지원과 같은 엔터프라이즈 기능이 필요한 개발자에게 이상적입니다.
차이점에 대한 자세한 내용은 Gemini API에서 Vertex AI로 마이그레이션에 대한 Google의 가이드를 참조하세요. Gemini 모델 및 Vertex AI 플랫폼용 통합 패키지는 langchain-google 저장소에서 유지 관리됩니다. 기타 Google API 및 서비스와의 다양한 LangChain 통합은 googleapis Github 조직 및 langchain-google-community 패키지에서 찾을 수 있습니다.

Google Generative AI (Gemini API & AI Studio)

빠른 개발 및 실험에 가장 적합한 Gemini API를 사용하여 Google Gemini 모델에 직접 액세스하세요. Gemini 모델은 Google AI Studio에서 사용할 수 있습니다.
pip install -U langchain-google-genai
무료로 시작하고 Google AI Studio에서 API 키를 받으세요.
export GOOGLE_API_KEY="YOUR_API_KEY"

Chat 모델

ChatGoogleGenerativeAI 클래스를 사용하여 Gemini 모델과 상호 작용하세요. 자세한 내용은 이 가이드를 참조하세요.
from langchain_google_genai import ChatGoogleGenerativeAI
from langchain.messages import HumanMessage

llm = ChatGoogleGenerativeAI(model="gemini-2.5-flash")

# 간단한 텍스트 호출
result = llm.invoke("Sing a ballad of LangChain.")
print(result.content)

# gemini-pro-vision을 사용한 멀티모달 호출
message = HumanMessage(
    content=[
        {
            "type": "text",
            "text": "What's in this image?",
        },
        {"type": "image_url", "image_url": "https://picsum.photos/seed/picsum/200/300"},
    ]
)
result = llm.invoke([message])
print(result.content)
image_url은 공개 URL, GCS URI(gs://...), 로컬 파일 경로, base64 인코딩 이미지 문자열(data:image/png;base64,...) 또는 PIL Image 객체가 될 수 있습니다.

임베딩 모델

GoogleGenerativeAIEmbeddings 클래스를 사용하여 gemini-embedding-001과 같은 모델을 사용해 텍스트 임베딩을 생성하세요. 사용 예제를 참조하세요.
from langchain_google_genai import GoogleGenerativeAIEmbeddings

embeddings = GoogleGenerativeAIEmbeddings(model="models/gemini-embedding-001")
vector = embeddings.embed_query("What are embeddings?")
print(vector[:5])

LLM

GoogleGenerativeAI 클래스를 사용하여 (레거시) LLM 인터페이스로 동일한 Gemini 모델에 액세스하세요. 사용 예제를 참조하세요.
from langchain_google_genai import GoogleGenerativeAI

llm = GoogleGenerativeAI(model="gemini-2.5-flash")
result = llm.invoke("Sing a ballad of LangChain.")
print(result)

Google Cloud

Vertex AI 및 특정 클라우드 통합을 통해 Gemini 모델, Vertex AI Model Garden 및 기타 Google Cloud 서비스에 액세스하세요. Vertex AI 모델에는 langchain-google-vertexai 패키지가 필요합니다. 기타 서비스에는 langchain-google-community, langchain-google-cloud-sql-pg 등과 같은 추가 패키지가 필요할 수 있습니다.
pip install langchain-google-vertexai
# pip install langchain-google-community[...] # 기타 서비스용
Google Cloud 통합은 일반적으로 ADC(Application Default Credentials)를 사용합니다. 설정 지침은 Google Cloud 인증 문서를 참조하세요(예: gcloud auth application-default login 사용).

Chat 모델

Vertex AI

Vertex AI 플랫폼을 통해 Gemini와 같은 채팅 모델에 액세스하세요. 사용 예제를 참조하세요.
from langchain_google_vertexai import ChatVertexAI

Vertex AI Model Garden의 Anthropic

사용 예제를 참조하세요.
from langchain_google_vertexai.model_garden import ChatAnthropicVertex

Vertex AI Model Garden의 Llama

from langchain_google_vertexai.model_garden_maas.llama import VertexModelGardenLlama

Vertex AI Model Garden의 Mistral

from langchain_google_vertexai.model_garden_maas.mistral import VertexModelGardenMistral

Hugging Face에서 로컬 Gemma

Hugging Face에서 로드된 로컬 Gemma 모델입니다. langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.gemma import GemmaChatLocalHF

Kaggle에서 로컬 Gemma

Kaggle에서 로드된 로컬 Gemma 모델입니다. langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.gemma import GemmaChatLocalKaggle

Vertex AI Model Garden의 Gemma

langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.gemma import GemmaChatVertexAIModelGarden

Vertex AI 이미지 캡셔닝

채팅으로 구현된 Image Captioning 모델입니다. langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.vision_models import VertexAIImageCaptioningChat

Vertex AI 이미지 에디터

이미지와 프롬프트가 주어지면 이미지를 편집합니다. 현재 마스크 없는 편집만 지원합니다. langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.vision_models import VertexAIImageEditorChat

Vertex AI 이미지 생성기

프롬프트에서 이미지를 생성합니다. langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.vision_models import VertexAIImageGeneratorChat

Vertex AI 비주얼 QnA

비주얼 QnA 모델의 채팅 구현입니다. langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.vision_models import VertexAIVisualQnAChat

LLM

(레거시) 문자열 입력, 문자열 출력 LLM 인터페이스를 사용할 수도 있습니다.

Vertex AI Model Garden

Vertex AI Model Garden 서비스를 통해 Gemini 및 수백 개의 OSS 모델에 액세스하세요. langchain-google-vertexai가 필요합니다. 사용 예제를 참조하세요.
from langchain_google_vertexai import VertexAIModelGarden

Hugging Face에서 로컬 Gemma

Hugging Face에서 로드된 로컬 Gemma 모델입니다. langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.gemma import GemmaLocalHF

Kaggle에서 로컬 Gemma

Kaggle에서 로드된 로컬 Gemma 모델입니다. langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.gemma import GemmaLocalKaggle

Vertex AI Model Garden의 Gemma

langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.gemma import GemmaVertexAIModelGarden

Vertex AI 이미지 캡셔닝

LLM으로 구현된 Image Captioning 모델입니다. langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.vision_models import VertexAIImageCaptioning

임베딩 모델

Vertex AI

Vertex AI에 배포된 모델을 사용하여 임베딩을 생성합니다. langchain-google-vertexai가 필요합니다. 사용 예제를 참조하세요.
from langchain_google_vertexai import VertexAIEmbeddings

문서 로더

다양한 Google Cloud 소스에서 문서를 로드합니다.

AlloyDB for PostgreSQL

Google Cloud AlloyDB는 완전 관리형 PostgreSQL 호환 데이터베이스 서비스입니다.
Python 패키지를 설치하세요:
pip install langchain-google-alloydb-pg
사용 예제를 참조하세요.
from langchain_google_alloydb_pg import AlloyDBLoader # AlloyDBEngine도 사용 가능

BigQuery

Google Cloud BigQuery는 서버리스 데이터 웨어하우스입니다.
BigQuery 종속성과 함께 설치하세요:
pip install langchain-google-community[bigquery]
사용 예제를 참조하세요.
from langchain_google_community import BigQueryLoader

Bigtable

Google Cloud Bigtable은 완전 관리형 NoSQL Big Data 데이터베이스 서비스입니다.
Python 패키지를 설치하세요:
pip install langchain-google-bigtable
사용 예제를 참조하세요.
from langchain_google_bigtable import BigtableLoader

Cloud SQL for MySQL

Google Cloud SQL for MySQL은 완전 관리형 MySQL 데이터베이스 서비스입니다.
Python 패키지를 설치하세요:
pip install langchain-google-cloud-sql-mysql
사용 예제를 참조하세요.
from langchain_google_cloud_sql_mysql import MySQLLoader # MySQLEngine도 사용 가능

Cloud SQL for SQL Server

Google Cloud SQL for SQL Server는 완전 관리형 SQL Server 데이터베이스 서비스입니다.
Python 패키지를 설치하세요:
pip install langchain-google-cloud-sql-mssql
사용 예제를 참조하세요.
from langchain_google_cloud_sql_mssql import MSSQLLoader # MSSQLEngine도 사용 가능

Cloud SQL for PostgreSQL

Google Cloud SQL for PostgreSQL은 완전 관리형 PostgreSQL 데이터베이스 서비스입니다.
Python 패키지를 설치하세요:
pip install langchain-google-cloud-sql-pg
사용 예제를 참조하세요.
from langchain_google_cloud_sql_pg import PostgresLoader # PostgresEngine도 사용 가능

Cloud Storage

Cloud Storage는 비구조화 데이터를 저장하기 위한 관리형 서비스입니다.
GCS 종속성과 함께 설치하세요:
pip install langchain-google-community[gcs]
디렉토리 또는 특정 파일에서 로드하세요: 디렉토리 사용 예제를 참조하세요.
from langchain_google_community import GCSDirectoryLoader
파일 사용 예제를 참조하세요.
from langchain_google_community import GCSFileLoader

Cloud Vision 로더

Google Cloud Vision API를 사용하여 데이터를 로드합니다. Vision 종속성과 함께 설치하세요:
pip install langchain-google-community[vision]
from langchain_google_community.vision import CloudVisionLoader

El Carro for Oracle Workloads

Google El Carro Oracle Operator는 Kubernetes에서 Oracle 데이터베이스를 실행합니다.
Python 패키지를 설치하세요:
pip install langchain-google-el-carro
사용 예제를 참조하세요.
from langchain_google_el_carro import ElCarroLoader

Firestore (Native Mode)

Google Cloud Firestore는 NoSQL 문서 데이터베이스입니다.
Python 패키지를 설치하세요:
pip install langchain-google-firestore
사용 예제를 참조하세요.
from langchain_google_firestore import FirestoreLoader

Firestore (Datastore Mode)

Google Cloud Firestore in Datastore mode입니다.
Python 패키지를 설치하세요:
pip install langchain-google-datastore
사용 예제를 참조하세요.
from langchain_google_datastore import DatastoreLoader

Memorystore for Redis

Google Cloud Memorystore for Redis는 완전 관리형 Redis 서비스입니다.
Python 패키지를 설치하세요:
pip install langchain-google-memorystore-redis
사용 예제를 참조하세요.
from langchain_google_memorystore_redis import MemorystoreDocumentLoader

Spanner

Google Cloud Spanner는 완전 관리형 전역 분산 관계형 데이터베이스 서비스입니다.
Python 패키지를 설치하세요:
pip install langchain-google-spanner
사용 예제를 참조하세요.
from langchain_google_spanner import SpannerLoader

Speech-to-Text

Google Cloud Speech-to-Text는 오디오 파일을 텍스트로 변환합니다.
Speech-to-Text 종속성과 함께 설치하세요:
pip install langchain-google-community[speech]
사용 예제 및 인증 지침을 참조하세요.
from langchain_google_community import SpeechToTextLoader

문서 변환기

Google Cloud 서비스를 사용하여 문서를 변환합니다.

Document AI

Google Cloud Document AI는 문서에서 비구조화 데이터를 구조화 데이터로 변환하여 이해, 분석 및 소비를 더 쉽게 만드는 Google Cloud 서비스입니다.
GCS 버킷을 설정하고 자체 OCR 프로세서를 만들어야 합니다. GCS_OUTPUT_PATH는 GCS의 폴더 경로(gs://로 시작)여야 하며 프로세서 이름은 projects/PROJECT_NUMBER/locations/LOCATION/processors/PROCESSOR_ID와 같아야 합니다. 프로그래밍 방식으로 가져오거나 Google Cloud Console의 Processor details 탭에 있는 Prediction endpoint 섹션에서 복사할 수 있습니다.
pip install langchain-google-community[docai]
사용 예제를 참조하세요.
from langchain_core.document_loaders.blob_loaders import Blob
from langchain_google_community import DocAIParser

Google Translate

Google Translate는 텍스트, 문서 및 웹사이트를 한 언어에서 다른 언어로 번역하기 위해 Google에서 개발한 다국어 신경 기계 번역 서비스입니다.
GoogleTranslateTransformer를 사용하면 Google Cloud Translation API를 사용하여 텍스트 및 HTML을 번역할 수 있습니다. 먼저 translate 종속성과 함께 langchain-google-community를 설치해야 합니다.
pip install langchain-google-community[translate]
사용 예제 및 인증 지침을 참조하세요.
from langchain_google_community import GoogleTranslateTransformer

벡터 스토어

Google Cloud 데이터베이스 및 Vertex AI Vector Search를 사용하여 벡터를 저장하고 검색합니다.

AlloyDB for PostgreSQL

Google Cloud AlloyDB는 Google Cloud에서 고성능, 원활한 통합 및 뛰어난 확장성을 제공하는 완전 관리형 관계형 데이터베이스 서비스입니다. AlloyDB는 PostgreSQL과 100% 호환됩니다.
Python 패키지를 설치하세요:
pip install langchain-google-alloydb-pg
사용 예제를 참조하세요.
from langchain_google_alloydb_pg import AlloyDBVectorStore # AlloyDBEngine도 사용 가능
Google Cloud BigQuery는 Google Cloud의 서버리스이며 비용 효율적인 엔터프라이즈 데이터 웨어하우스입니다. Google Cloud BigQuery Vector Search를 사용하면 GoogleSQL을 사용하여 시맨틱 검색을 수행할 수 있으며, 빠르지만 근사치 결과를 위한 벡터 인덱스를 사용하거나 정확한 결과를 위한 무차별 대입을 사용할 수 있습니다.
유클리드 또는 코사인 거리를 계산할 수 있습니다. LangChain에서는 기본적으로 유클리드 거리를 사용합니다.
여러 Python 패키지를 설치해야 합니다.
pip install google-cloud-bigquery
사용 예제를 참조하세요.
# 참고: BigQueryVectorSearch는 버전에 따라 langchain 또는 langchain_community에 있을 수 있습니다.
# 사용 예제에서 import를 확인하세요.
from langchain.vectorstores import BigQueryVectorSearch # 또는 langchain_community.vectorstores

Memorystore for Redis

Memorystore for Redis를 사용하는 벡터 스토어입니다.
Python 패키지를 설치하세요:
pip install langchain-google-memorystore-redis
사용 예제를 참조하세요.
from langchain_google_memorystore_redis import RedisVectorStore

Spanner

Cloud Spanner를 사용하는 벡터 스토어입니다.
Python 패키지를 설치하세요:
pip install langchain-google-spanner
사용 예제를 참조하세요.
from langchain_google_spanner import SpannerVectorStore

Firestore (Native Mode)

Firestore를 사용하는 벡터 스토어입니다.
Python 패키지를 설치하세요:
pip install langchain-google-firestore
사용 예제를 참조하세요.
from langchain_google_firestore import FirestoreVectorStore

Cloud SQL for MySQL

Cloud SQL for MySQL을 사용하는 벡터 스토어입니다.
Python 패키지를 설치하세요:
pip install langchain-google-cloud-sql-mysql
사용 예제를 참조하세요.
from langchain_google_cloud_sql_mysql import MySQLVectorStore # MySQLEngine도 사용 가능

Cloud SQL for PostgreSQL

Cloud SQL for PostgreSQL을 사용하는 벡터 스토어입니다.
Python 패키지를 설치하세요:
pip install langchain-google-cloud-sql-pg
사용 예제를 참조하세요.
from langchain_google_cloud_sql_pg import PostgresVectorStore # PostgresEngine도 사용 가능
Google Cloud의 Google Cloud Vertex AI Vector Search(이전에는 Vertex AI Matching Engine으로 알려짐)는 업계 최고 수준의 대규모 저지연 벡터 데이터베이스를 제공합니다. 이러한 벡터 데이터베이스는 일반적으로 벡터 유사성 매칭 또는 근사 최근접 이웃(ANN) 서비스라고 합니다.
Python 패키지를 설치하세요:
pip install langchain-google-vertexai
사용 예제를 참조하세요.
from langchain_google_vertexai import VectorSearchVectorStore
DataStore 백엔드 사용
문서 저장을 위해 Datastore를 사용하는 벡터 검색입니다.
사용 예제를 참조하세요.
from langchain_google_vertexai import VectorSearchVectorStoreDatastore
GCS 백엔드 사용
GCS에 문서/인덱스를 저장하는 VectorSearchVectorStore의 별칭입니다.
from langchain_google_vertexai import VectorSearchVectorStoreGCS

리트리버

Google Cloud 서비스를 사용하여 정보를 검색합니다.
Vertex AI Search를 사용하여 생성형 AI 기반 검색 엔진을 구축하세요. Google Cloud의 Vertex AI Search를 사용하면 개발자가 고객과 직원을 위한 생성형 AI 기반 검색 엔진을 빠르게 구축할 수 있습니다.
사용 예제를 참조하세요. 참고: GoogleVertexAISearchRetriever는 더 이상 사용되지 않습니다. langchain-google-community의 아래 구성 요소를 사용하세요. 기본 액세스를 위해 google-cloud-discoveryengine 패키지를 설치하세요.
pip install google-cloud-discoveryengine langchain-google-community
VertexAIMultiTurnSearchRetriever
from langchain_google_community import VertexAIMultiTurnSearchRetriever
VertexAISearchRetriever
# 참고: 예제 코드는 VertexAIMultiTurnSearchRetriever를 보여주며, VertexAISearchRetriever가 별도인지 관련되어 있는지 확인하세요.
# 관련되어 있거나 원본 문서의 오타일 수 있다고 가정합니다:
from langchain_google_community import VertexAISearchRetriever # 필요한 경우 클래스 이름 확인
VertexAISearchSummaryTool
from langchain_google_community import VertexAISearchSummaryTool

Document AI Warehouse

Document AI Warehouse를 사용하여 문서를 검색, 저장 및 관리합니다.
참고: GoogleDocumentAIWarehouseRetriever(langchain에서)는 더 이상 사용되지 않습니다. langchain-google-communityDocumentAIWarehouseRetriever를 사용하세요. 관련 Document AI 패키지 설치가 필요합니다(특정 문서 참조).
pip install langchain-google-community # 필요한 경우 특정 docai 종속성 추가
from langchain_google_community.documentai_warehouse import DocumentAIWarehouseRetriever

도구

에이전트를 다양한 Google 서비스와 통합합니다.

Text-to-Speech

Google Cloud Text-to-Speech는 개발자가 100개 이상의 음성으로 자연스러운 음성을 합성할 수 있게 하는 Google Cloud 서비스로, 여러 언어와 변형으로 사용할 수 있습니다. WaveNet에 대한 DeepMind의 획기적인 연구와 Google의 강력한 신경망을 적용하여 가능한 최고의 충실도를 제공합니다.
필요한 패키지를 설치하세요:
pip install google-cloud-text-to-speech langchain-google-community
사용 예제 및 인증 지침을 참조하세요.
from langchain_google_community import TextToSpeechTool

Google Drive

Google Drive와 상호 작용하기 위한 도구입니다. 필요한 패키지를 설치하세요:
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib langchain-googledrive
사용 예제 및 인증 지침을 참조하세요.
from langchain_googledrive.utilities.google_drive import GoogleDriveAPIWrapper
from langchain_googledrive.tools.google_drive.tool import GoogleDriveSearchTool

Google Finance

금융 데이터를 쿼리합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_finance import GoogleFinanceQueryRun
from langchain_community.utilities.google_finance import GoogleFinanceAPIWrapper

Google Jobs

채용 정보를 쿼리합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_jobs import GoogleJobsQueryRun
# 참고: 유틸리티가 공유될 수 있으며, 예를 들어 GoogleFinanceAPIWrapper가 나열되었는데, 올바른 유틸리티를 확인하세요.
# from langchain_community.utilities.google_jobs import GoogleJobsAPIWrapper # 존재하는 경우

Google Lens

시각적 검색을 수행합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_lens import GoogleLensQueryRun
from langchain_community.utilities.google_lens import GoogleLensAPIWrapper

Google Places

장소 정보를 검색합니다. googlemaps 패키지와 Google Maps API 키가 필요합니다.
pip install googlemaps langchain # 기본 langchain 필요
사용 예제 및 인증 지침을 참조하세요.
# 참고: GooglePlacesTool은 버전에 따라 langchain 또는 langchain_community에 있을 수 있습니다.
from langchain.tools import GooglePlacesTool # 또는 langchain_community.tools

Google Scholar

학술 논문을 검색합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_scholar import GoogleScholarQueryRun
from langchain_community.utilities.google_scholar import GoogleScholarAPIWrapper
Google Custom Search Engine(CSE)을 사용하여 웹 검색을 수행합니다. GOOGLE_API_KEYGOOGLE_CSE_ID가 필요합니다. langchain-google-community를 설치하세요:
pip install langchain-google-community
Wrapper:
from langchain_google_community import GoogleSearchAPIWrapper
Tools:
from langchain_community.tools import GoogleSearchRun, GoogleSearchResults
Agent Loading:
from langchain_community.agent_toolkits.load_tools import load_tools
tools = load_tools(["google-search"])
자세한 노트북을 참조하세요. Google Trends 데이터를 쿼리합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_trends import GoogleTrendsQueryRun
from langchain_community.utilities.google_trends import GoogleTrendsAPIWrapper

툴킷

특정 Google 서비스를 위한 도구 모음입니다.

Gmail

Google Gmail은 Google에서 제공하는 무료 이메일 서비스입니다. 이 툴킷은 Gmail API를 통해 이메일과 함께 작동합니다.
pip install langchain-google-community[gmail]
사용 예제 및 인증 지침을 참조하세요.
# 전체 툴킷 로드
from langchain_google_community import GmailToolkit

# 또는 개별 도구 사용
from langchain_google_community.gmail.create_draft import GmailCreateDraft
from langchain_google_community.gmail.get_message import GmailGetMessage
from langchain_google_community.gmail.get_thread import GmailGetThread
from langchain_google_community.gmail.search import GmailSearch
from langchain_google_community.gmail.send_message import GmailSendMessage

MCP Toolbox

MCP ToolboxCloud SQLAlloyDB와 같은 Google Cloud의 데이터베이스를 포함하여 데이터베이스에 연결하는 간단하고 효율적인 방법을 제공합니다. MCP Toolbox를 사용하면 데이터베이스를 LangChain과 원활하게 통합하여 강력한 데이터 기반 애플리케이션을 구축할 수 있습니다.

설치

시작하려면 Toolbox 서버 및 클라이언트를 설치하세요. tools.yaml구성하여 도구를 정의한 다음, toolbox를 실행하여 서버를 시작하세요:
toolbox --tools-file "tools.yaml"
그런 다음 Toolbox 클라이언트를 설치하세요:
pip install toolbox-langchain

시작하기

다음은 MCP Toolbox를 사용하여 데이터베이스에 연결하는 빠른 예제입니다:
from toolbox_langchain import ToolboxClient

async with ToolboxClient("http://127.0.0.1:5000") as client:

    tools = client.load_toolset()
사용 예제 및 설정 지침을 참조하세요.

콜백

LLM/Chat 모델 사용량을 추적합니다.

Vertex AI 콜백 핸들러

VertexAI 사용 정보를 추적하는 콜백 핸들러입니다.
langchain-google-vertexai가 필요합니다.
from langchain_google_vertexai.callbacks import VertexAICallbackHandler

평가자

Vertex AI를 사용하여 모델 출력을 평가합니다. langchain-google-vertexai가 필요합니다.

VertexPairWiseStringEvaluator

Vertex AI 모델을 사용한 쌍별 평가입니다.
from langchain_google_vertexai.evaluators.evaluation import VertexPairWiseStringEvaluator

VertexStringEvaluator

Vertex AI 모델을 사용하여 단일 예측 문자열을 평가합니다.
# 참고: 원본 문서에서는 VertexPairWiseStringEvaluator를 두 번 나열했습니다. 이 클래스가 존재한다고 가정합니다.
from langchain_google_vertexai.evaluators.evaluation import VertexStringEvaluator # 필요한 경우 클래스 이름 확인

기타 Google 제품

핵심 Cloud Platform을 넘어선 다양한 Google 서비스와의 통합입니다.

문서 로더

Google Drive

Google Drive 파일 스토리지입니다. 현재 Google Docs를 지원합니다.
Drive 종속성과 함께 설치하세요:
pip install langchain-google-community[drive]
사용 예제 및 인증 지침을 참조하세요.
from langchain_google_community import GoogleDriveLoader

벡터 스토어

ScaNN (로컬 인덱스)

Google ScaNN (Scalable Nearest Neighbors)은 Python 패키지입니다. ScaNN은 대규모에서 효율적인 벡터 유사성 검색을 위한 방법입니다.
ScaNN은 Maximum Inner Product Search를 위한 검색 공간 가지치기 및 양자화를 포함하며 유클리드 거리와 같은 다른 거리 함수도 지원합니다. 구현은 AVX2 지원이 있는 x86 프로세서에 최적화되어 있습니다. 자세한 내용은 Google Research github를 참조하세요.
scann 패키지를 설치하세요:
pip install scann langchain-community # langchain-community 필요
사용 예제를 참조하세요.
from langchain_community.vectorstores import ScaNN

리트리버

Google Drive

Google Drive에서 문서를 검색합니다. 필요한 패키지를 설치하세요:
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib langchain-googledrive
사용 예제 및 인증 지침을 참조하세요.
from langchain_googledrive.retrievers import GoogleDriveRetriever

도구

Google Drive

Google Drive와 상호 작용하기 위한 도구입니다. 필요한 패키지를 설치하세요:
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib langchain-googledrive
사용 예제 및 인증 지침을 참조하세요.
from langchain_googledrive.utilities.google_drive import GoogleDriveAPIWrapper
from langchain_googledrive.tools.google_drive.tool import GoogleDriveSearchTool

Google Finance

금융 데이터를 쿼리합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_finance import GoogleFinanceQueryRun
from langchain_community.utilities.google_finance import GoogleFinanceAPIWrapper

Google Jobs

채용 정보를 쿼리합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_jobs import GoogleJobsQueryRun
# 참고: 유틸리티가 공유될 수 있으며, 예를 들어 GoogleFinanceAPIWrapper가 나열되었는데, 올바른 유틸리티를 확인하세요.
# from langchain_community.utilities.google_jobs import GoogleJobsAPIWrapper # 존재하는 경우

Google Lens

시각적 검색을 수행합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_lens import GoogleLensQueryRun
from langchain_community.utilities.google_lens import GoogleLensAPIWrapper

Google Places

장소 정보를 검색합니다. googlemaps 패키지와 Google Maps API 키가 필요합니다.
pip install googlemaps langchain # 기본 langchain 필요
사용 예제 및 인증 지침을 참조하세요.
# 참고: GooglePlacesTool은 버전에 따라 langchain 또는 langchain_community에 있을 수 있습니다.
from langchain.tools import GooglePlacesTool # 또는 langchain_community.tools

Google Scholar

학술 논문을 검색합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_scholar import GoogleScholarQueryRun
from langchain_community.utilities.google_scholar import GoogleScholarAPIWrapper

Google Search

Google Custom Search Engine(CSE)을 사용하여 웹 검색을 수행합니다. GOOGLE_API_KEYGOOGLE_CSE_ID가 필요합니다. langchain-google-community를 설치하세요:
pip install langchain-google-community
Wrapper:
from langchain_google_community import GoogleSearchAPIWrapper
Tools:
from langchain_community.tools import GoogleSearchRun, GoogleSearchResults
Agent Loading:
from langchain_community.agent_toolkits.load_tools import load_tools
tools = load_tools(["google-search"])
자세한 노트북을 참조하세요. Google Trends 데이터를 쿼리합니다. google-search-results 패키지와 SerpApi 키가 필요합니다.
pip install google-search-results langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.tools.google_trends import GoogleTrendsQueryRun
from langchain_community.utilities.google_trends import GoogleTrendsAPIWrapper

툴킷

Gmail

Google Gmail은 Google에서 제공하는 무료 이메일 서비스입니다. 이 툴킷은 Gmail API를 통해 이메일과 함께 작동합니다.
pip install langchain-google-community[gmail]
사용 예제 및 인증 지침을 참조하세요.
# 전체 툴킷 로드
from langchain_google_community import GmailToolkit

# 또는 개별 도구 사용
from langchain_google_community.gmail.create_draft import GmailCreateDraft
from langchain_google_community.gmail.get_message import GmailGetMessage
from langchain_google_community.gmail.get_thread import GmailGetThread
from langchain_google_community.gmail.search import GmailSearch
from langchain_google_community.gmail.send_message import GmailSendMessage

Chat 로더

Gmail

Gmail 스레드에서 채팅 기록을 로드합니다.
Gmail 종속성과 함께 설치하세요:
pip install langchain-google-community[gmail]
사용 예제 및 인증 지침을 참조하세요.
from langchain_google_community import GMailLoader

서드파티 통합

서드파티 API를 통해 Google 서비스에 액세스합니다.

SearchApi

SearchApi는 Google 검색, YouTube 등에 대한 API 액세스를 제공합니다. langchain-community가 필요합니다.
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.utilities import SearchApiAPIWrapper

SerpApi

SerpApi는 Google 검색 결과에 대한 API 액세스를 제공합니다. langchain-community가 필요합니다.
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.utilities import SerpAPIWrapper

Serper.dev

Google Serper는 Google 검색 결과에 대한 API 액세스를 제공합니다. langchain-community가 필요합니다.
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.utilities import GoogleSerperAPIWrapper

YouTube

YouTube 검색 도구

공식 API 없이 YouTube 동영상을 검색합니다. youtube_search 패키지가 필요합니다.
pip install youtube_search langchain # 기본 langchain 필요
사용 예제를 참조하세요.
# 참고: YouTubeSearchTool은 langchain 또는 langchain_community에 있을 수 있습니다.
from langchain.tools import YouTubeSearchTool # 또는 langchain_community.tools

YouTube 오디오 로더

YouTube 동영상에서 오디오를 다운로드합니다. yt_dlp, pydub, librosa가 필요합니다.
pip install yt_dlp pydub librosa langchain-community # langchain-community 필요
사용 예제 및 인증 지침을 참조하세요.
from langchain_community.document_loaders.blob_loaders.youtube_audio import YoutubeAudioLoader
# 종종 whisper 파서와 함께 사용됩니다:
# from langchain_community.document_loaders.parsers import OpenAIWhisperParser, OpenAIWhisperParserLocal

YouTube 자막 로더

동영상 자막을 로드합니다. youtube-transcript-api가 필요합니다.
pip install youtube-transcript-api langchain-community # langchain-community 필요
사용 예제를 참조하세요.
from langchain_community.document_loaders import YoutubeLoader

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I