DEV Community

Juan Felipe Lujan
Juan Felipe Lujan

Posted on • Originally published at dev.to

Build LLM apps without coding. Langchain 🦜🔗

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

  1. Go to the Google Cloud console.
  2. Click the hamburger menu in the top left corner of the page.
  3. Select APIs & Services > Library.
  4. Search for "Vertex AI."
  5. Click the Vertex AI API.
  6. Click Enable.

Creating a service account in Google Cloud

  1. Click the hamburger menu in the top left corner of the page.
  2. Select IAM & Admin > Service accounts.
  3. Click Create service account.
  4. Enter a name for the service account. Click Create and Continue.
  5. Grant the service account the Vertex AI User role.
  6. (Optional) Enter a description for the service account.
  7. 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

  1. Click the email address of the new service account.
  2. Click the Keystab.
  3. Click the Add key drop-down menu.
  4. Select Create new key.
  5. Select JSONas the key type.
  6. Click Create.
  7. 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)