-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: enhance Google Cloud Vertex AI setup guide for Langflow #4745
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,81 @@ | ||||||||||||
--- | ||||||||||||
title: 'Setup Google Cloud Vertex AI for Langflow Integration' | ||||||||||||
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." | ||||||||||||
--- | ||||||||||||
|
||||||||||||
# Setting up Google Cloud Vertex AI for Langflow | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
This guide walks you through creating a Google Cloud Vertex AI API Key and configuring it in Langflow's Vertex AI component. | ||||||||||||
|
||||||||||||
## Step 1: Create a New Project {#689304485d979f767f1a2ee4c8986cf6} | ||||||||||||
|
||||||||||||
Go to the [https://console.cloud.google.com/projectcreate](https://console.cloud.google.com/projectcreate), enter a name for the project, and click **Create**. | ||||||||||||
|
||||||||||||
![Create a new project](/img/google/create-a-new-project.png) | ||||||||||||
|
||||||||||||
## Step 2: Create a Service Account | ||||||||||||
|
||||||||||||
Go to [https://console.cloud.google.com/iam-admin/serviceaccounts](https://console.cloud.google.com/iam-admin/serviceaccounts), Select the project you created in the [Step 1: Create a New Project](#689304485d979f767f1a2ee4c8986cf6), and click **Create Service Account**. Provide a name, description, and then click on **Create and Continue**. | ||||||||||||
|
||||||||||||
Create a new **Service Account**: | ||||||||||||
|
||||||||||||
![Create a new Service Account](/img/google/create-a-new-service-account.png) | ||||||||||||
|
||||||||||||
Enter **Service Account Details**: | ||||||||||||
|
||||||||||||
![Enter Service Account Details](/img/google/enter-service-account-details.png) | ||||||||||||
|
||||||||||||
### Step 2.1: Assign the Vertex AI Service Agent Role | ||||||||||||
|
||||||||||||
Assign the **Vertex AI Service Agent** role to your new account and complete the setup. | ||||||||||||
|
||||||||||||
![Assign Vertex AI Service Agent Role](/img/google/assing-vertex-ai-service-agent-role.gif) | ||||||||||||
|
||||||||||||
## Step 3: Generate a New Key | ||||||||||||
|
||||||||||||
Go to the **Keys** tab under your Service Account, click **Add Key > Create new key**, select **JSON**, and click **Create**. A JSON key file will be downloaded. | ||||||||||||
|
||||||||||||
![Create a new private key](/img/google/create-a-new-private-key.gif) | ||||||||||||
|
||||||||||||
The saved file looks like the example below: | ||||||||||||
|
||||||||||||
```json | ||||||||||||
{ | ||||||||||||
"type": "service_account", | ||||||||||||
"project_id": "mimetic-client-847522-v1", | ||||||||||||
"private_key_id": "206a9b53bba3cea76d5a42e4eddf9410da0222d2", | ||||||||||||
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDJd4y2kAfjMjIL\nuqN3fecSmrAPgxGb9q1cSf/DYnppDQv7Co7hLxD/nWHLrP5Q++Yte0IJbdIjWJOb\nfhjlkjasd152as65T7asd8z4w9vwHS03cyCcIPijujzainWEL8HgQrj8/0FSAKBd\nfhjlkjasd152as65T7asd8WlUfkrjIGUAL6psr7IOfhLuyvRS9WiYrUFvV2Hdivr\nasd846f6545NZzXOJtuZd9Wk5TSo5exO8EKNHLNUU2F7HC9KAAIXb\n3546asd656873xZt75sVubOnlPj68R4UsIl2OLFMXM12cIGwRYj2vg/\n6579ads654dasd32168L4RT9GwJGCmgE+6ZU05wvwCJtpqnfD4p9cDiK0hrL\nfhjlkjasd152as65T7asd5JjO0E8whBQKBgQD9GRXUNG8OO3BZvEOZCYE3PDP9Yc\nasd315465132a1sd6544IcVSOqfiB0/ELPjPt8V4hjEcpkdQsiSYZLbM87mQcB\n-----END PRIVATE KEY-----\n", | ||||||||||||
"client_email": "example@mimetic-client-847522-v1.iam.gserviceaccount.com", | ||||||||||||
"client_id": "2956348811335699541865", | ||||||||||||
"auth_uri": "https://accounts.google.com/o/oauth2/auth", | ||||||||||||
"token_uri": "https://oauth2.googleapis.com/token", | ||||||||||||
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", | ||||||||||||
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/example%40mimetic-client-847522-v1.iam.gserviceaccount.com", | ||||||||||||
"universe_domain": "googleapis.com" | ||||||||||||
} | ||||||||||||
``` | ||||||||||||
|
||||||||||||
## Step 4: Enable the Vertex AI API | ||||||||||||
|
||||||||||||
Go to the [Vertex AI API page](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com), select your project, and click **Enable**. | ||||||||||||
|
||||||||||||
![Enable Vertex AI API](/img/google/enable-vertex-ai-api.png) | ||||||||||||
Comment on lines
+12
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The DataStax Documentation team tries to avoid documenting steps and including screenshots for 3rd-party applications. It becomes a maintenance nightmare. We cannot keep up with changes that happen in another company's products. Our standard practice is to provide general guidance, such as "In the Google Cloud Console, create a new project.", and then link to the Google Cloud Console docs. Regarding the heading format, we don't use numbered steps in headings and we use sentence case instead of title case. @mendonk can you help bring this content up to our standards? |
||||||||||||
|
||||||||||||
## Step 5: Configure Credentials in Langflow Components | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
1. Open Langflow | ||||||||||||
2. Create a new project or open an existing one | ||||||||||||
Comment on lines
+68
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
3. From the components sidebar, drag and drop either the **Vertex AI** or **Vertex AI Embeddings** component to your workspace | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
4. In the component settings: | ||||||||||||
- Locate the **credentials** field | ||||||||||||
- Click on the field | ||||||||||||
- Browse and select the JSON credentials file containing your API key downloaded in [Step 3: Generate a New Key](#step-3-generate-a-new-key) | ||||||||||||
Comment on lines
+71
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
5. After the credentials file is loaded, the component is ready to use | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
![Configure Vertex AI Credentials in Langflow](/img/google/configure-vertex-ai-credentials-in-langflow.gif) | ||||||||||||
|
||||||||||||
Remember to add the credentials file in the credentials field for each Vertex AI component you add to your workspace. | ||||||||||||
|
||||||||||||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.