Skip to content

Commit

Permalink
vertexai: Add Intro to the Vertex AI library (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
SauravP97 authored Jan 13, 2025
1 parent fda0eaf commit 2314c92
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions libs/vertexai/langchain_google_vertexai/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
"""**LangChain Google Generative AI Integration**
This module contains the LangChain integrations for Vertex AI service - Google foundational models, third-party foundational modela available on Vertex Model Garden and.
**Supported integrations**
1. Google's founational models: Gemini family, Codey, embeddings - `ChatVertexAI`, `VertexAI`, `VertexAIEmbeddings`.
2. Other Google's foundational models: Imagen - `VertexAIImageCaptioning`, `VertexAIImageCaptioningChat`, `VertexAIImageEditorChat`, `VertexAIImageGeneratorChat`, `VertexAIVisualQnAChat`.
3. Third-party foundational models available as a an API (mdel-as-a-service) on Vertex Model Garden (Mistral, Llama, Anthropic) - `model_garden.ChatAnthropicVertex`, `model_garden_maas.VertexModelGardenLlama`, `model_garden_maas.VertexModelGardenMistral`.
4. Third-party foundational models deployed on Vertex AI endpoints from Vertex Model Garden or Hugginface - `VertexAIModelGarden`.
5. Gemma deployed on Vertex AI endpoints or locally - `GemmaChatLocalHF`, `GemmaChatLocalKaggle`, `GemmaChatVertexAIModelGarden`, `GemmaLocalHF`, `GemmaLocalKaggle`, `GemmaVertexAIModelGarden`.
5. Vector Search on Vertex AI - `VectorSearchVectorStore`, `VectorSearchVectorStoreDatastore`, `VectorSearchVectorStoreGCS`.
6. Vertex AI evaluators for generative AI - `VertexPairWiseStringEvaluator`, `VertexStringEvaluator`.
Take a look at detailed documentation for each class for further details.
**Installation**
```bash
pip install -U langchain-google-vertexai
```
You need to enable needed Google Cloud APIs (depending on the integration you're using) and set up credentials by either:
- Have credentials configured for your environment
(gcloud, workload identity, etc...)
- Store the path to a service account JSON file as the
GOOGLE_APPLICATION_CREDENTIALS environment variable
This codebase uses the google.auth library which first looks for the application
credentials variable mentioned above, and then looks for system-level auth.
For more information, see:
https://cloud.google.com/docs/authentication/application-default-credentials#GAC
and
https://googleapis.dev/python/google-auth/latest/reference/google.auth.html#module-google.auth.
""" # noqa: E501

from google.cloud.aiplatform_v1beta1.types import (
FunctionCallingConfig,
FunctionDeclaration,
Expand Down

0 comments on commit 2314c92

Please sign in to comment.