A comprehensive guide on using Langflow and Flowise for building Langchain apps with Google's PALM2 LLM.
This article starts a new series on langchain from the low-code/no-code perspective, where you'll learn how to create LLM apps using visual scripting.
If JavaScript is your territory, that would be Flowise, and for Python enthusiasts, the tool would be Langflow.
Most of the Langchain guides on the internet use OpenAI's GPT3.5 or GTP4, but I will use Google's Palm2 in this series, given that you get 300 USD when you sign up for Google Cloud for the first time.
I signed up in Canada and got 500+ CAD of credits; much more than the 5 USD you get for free with OpenAI.
You will need a service account with access to VertexAI; this is the identity under which Langchain will communicate with Google Cloud. Quick note: Using your primary Google Account for Langchain is a bad idea, as that account has god-level permissions on your Google Cloud project. Use a service account with limited permissions instead.
Enabling the Vertex AI API
- Go to the Google Cloud console.
- Click the hamburger menu in the top left corner of the page.
- Select APIs & Services > Library.
- Search for "Vertex AI."
- Click the Vertex AI API.
- Click Enable.
Creating a service account in Google Cloud
- Click the hamburger menu in the top left corner of the page.
- Select IAM & Admin > Service accounts.
- Click Create service account.
- Enter a name for the service account. Click Create and Continue.
- Grant the service account the Vertex AI User role.
- (Optional) Enter a description for the service account.
- Click Done.
Now, you'll see the list of service accounts available in your project for downloading the JSON Key of your newly created service account.
Downloading the JSON key
- Click the email address of the new service account.
- Click the Keystab.
- Click the Add key drop-down menu.
- Select Create new key.
- Select JSONas the key type.
- Click Create.
- Download your key and store it securely.
Note: Anyone with this JSON file might use your service account on your behalf; do NOT share it online.
Next Steps
Create your first LLM app with Flowise(JS-based)
[WIP]Create your first LLM app with Flowise LangFlow(Python-based)
Top comments (0)