docs: enhance Google Cloud Vertex AI setup guide for Langflow (#4745)

* docs: enhance Google Cloud Vertex AI setup guide for Langflow

- Add detailed step-by-step instructions for creating a Google Cloud project
- Include instructions for creating and configuring a Service Account
- Add steps for generating and downloading a JSON key file
- Provide an example of the JSON key file structure
- Include instructions for enabling the Vertex AI API
- Add steps for configuring credentials in Langflow components
- Include relevant screenshots and GIFs to illustrate each step visually
- Improve overall clarity and completeness of the setup process

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* feat: Update Google Cloud Vertex AI integration documentation for clarity and structure

* remove-unused-images

* docs: update Google Cloud Vertex AI integration setup instructions

* docs: update Google Cloud Vertex AI integration setup instructions

---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
This commit is contained in:
Vinícios Batista da Silva 2024-12-06 19:35:27 -03:00 committed by GitHub
commit 3e5ab7e0f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 43 additions and 3 deletions

View file

@ -0,0 +1,39 @@
---
title: 'Integrate Google Cloud Vertex AI with Langflow'
slug: /integrations-setup-google-cloud-vertex-ai-langflow
sidebar_position: 2
description: "A comprehensive guide on creating a Google OAuth app, obtaining tokens, and integrating them with Langflow's Google components."
---
Langflow integrates with the [Google Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) for authenticating the [Vertex AI embeddings model](/components-embedding-models#vertexai-embeddings) and [Vertex AI](/components-models#vertexai) components.
Learn how to create a service account JSON in Google Cloud to authenticate Langflows Vertex AI components.
## Create a service account with Vertex AI access
1. Select and enable your Google Cloud project.
For more information, see [Create a Google Cloud project](https://developers.google.com/workspace/guides/create-project).
2. Create a service account in your Google Cloud project.
For more information, see [Create a service account](https://developers.google.com/workspace/guides/create-credentials#service-account).
3. Assign the **Vertex AI Service Agent** role to your new account.
This role allows Langflow to access Vertex AI resources.
For more information, see [Vertex AI access control with IAM](https://cloud.google.com/vertex-ai/docs/general/access-control).
4. To generate a new JSON key for the service account, navigate to your service account.
5. Click **Add Key**, and then click **Create new key**.
6. Under **Key type**, select **JSON**, and then click **Create**.
A JSON private key file is downloaded.
Now that you have a service account and a JSON private key, you need to configure the credentials in Langflow components.
## Configure credentials in Langflow components
With your service account configured and your credentials JSON file created, follow these steps to authenticate the Langflow application.
1. Create a new project in Langflow.
2. From the components sidebar, drag and drop either the **Vertex AI** or **Vertex AI Embeddings** component to your workspace.
3. In the Vertex AI component's **Credentials** field, add the service account JSON file.
4. Confirm the component can access the Vertex AI resources.
Connect a **Chat input** and **Chat output** component to the Vertex AI component.
A successful chat confirms the component has access to the Vertex AI resources.
![Configure Vertex AI Credentials in Langflow](/img/google/configure-vertex-ai-credentials-in-langflow.gif)

View file

@ -106,10 +106,11 @@ module.exports = {
"Integrations/integrations-langsmith",
"Integrations/integrations-langwatch",
{
type: "category",
label: "Google",
type: 'category',
label: 'Google',
items: [
"Integrations/Google/integrations-setup-google-oauth-langflow",
'Integrations/Google/integrations-setup-google-oauth-langflow',
'Integrations/Google/integrations-setup-google-cloud-vertex-ai-langflow',
],
},
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB