This exercise will use Flowise hosted on Hugging Face to build a LLM-powered English-to-Japanese translator app.
Login to Hugging Face 🤗 and click on the workspace created.
At Chatflow dashboard, click “Add New” , a new “Untitled Chatflow” canvas is created.
The + icon on the top left is to add node.
Click on + icon and search for LLM Chain. Drage it onto the canvas.
Next, search for the ChatOpenAI node and drag onto the canvas.
On the ChatOpenAI node, connect the credential and select the LLM model.
In the ChatOpenAI node, click on Additional Parameters and fill in the various fields as below.
In the add credential, name the credential and paste your OpenAI API key.
Next, search for Chat Prompt Template node and drag it onto the canvas.
You are a helpful, friendly and bilingual assistant. You will be asked for assistance in {input language}. You are to provide two responses. One paragraph in {output language} and the other paragraph in {input language}
{text}
Click on the Format Prompt Values. Input the input and output_language and text by clicking on the pen icon (edit).
The input language is English and choose your preferred output language - Japanese, French, Spanish or Chinese.
For text, enter .
Connect the output of ChatOpenAI and Chat Prompt Template into the Language Model and Prompt of LLM Chain node respectively.
Save the chatflow and give it an approriate name. The chatbot is ready to start chatting.
Here’s a glimspe of the chat messages.
Click here for video demo of the chatbot
Back to Projects Portfolio