DEV Community

Juan Felipe Lujan
Juan Felipe Lujan

Posted on

🦜🔗Langchain without code -> Flowise

In this article, I will explain how to get started with Flowise using Google's foundation model, Palm2. I assume you already have a service account with access to the VertexAI API. If you don't, follow this guide.

Installing NodeJS on Windows and Mac.

  1. Go to the Node.js Downloads page.
  2. Click either the Windows installer or the MacOS installer.
  3. For Windows, run the downloaded Node.js .msi Installer. For Mac, Run the .pkg installer.

  4. Installing Flowise:
    Windows: Press Windows key + r and type powershell
    MacOS: Press command + space bar and type terminal
    Windows & MacOS: Write npm install -g flowise (might require elevated privileges)
    Windows & MacOS: Write npx flowise start

  5. In your web browser, go to http://localhost:3000/

    Voila! Welcome to Flowise.🥳🥳🥳

Using Flow Creating your first 🦜🔗Langchain app.

You will create an app that behaves like an English teacher who talks about any topic and patiently corrects your grammar.

  1. In Flowise click Marketplace > Translator.
  2. Click Use template, save, and give your app a name.
  3. To replace ChatOpenAI with Google Palm2, Hover over the ChatOpenAI action in your diagram and click the delete button.
    Image description
    Click + sign on the top left part of your screen and find the **ChatGoogleVertexAI **option under Chat Models.
    Image description
    Drag and drop it into the canvas.

  4. Configuring the ChatGoogleVertexAI model: Under Connect Credential, select Create New.
    CREDENTIAL NAME: VertexAI credentials
    Credential JSON Object: The contents of the JSON file you recently downloaded from Google Cloud.
    Project ID: Your Google Cloud Project ID. You can find it here:
    Image description

  5. Connect the language model node from ChatGoogleVertexAI to LLM Chain.
    Image description

  6. In the Chat Promp Template box, replace the System Message with this:

you are a language teacher teacher having a conversation with a student in {input_language}
When the text sent by the student contains wrong grammar, you will reply by sending back the corrected message as "corrected" and a follow-up message on the conversation topic as "follow-up". Include emojis.
Your responses should be formatted like this:
Corrected:
follow-up:

Save and click the chat icon to start using your first LLM app.🤯🤯🤯

Image description

Top comments (0)