Table of Contents
Creating Chatflows & LLM Chains with FlowiseAI
In this blog post, we will guide you through creating your first chatflow using an LLM Chain and OpenAI model, based on the [FlowiseAI Tutorial #2](https://www.youtube.com/watch?v=fY2J0XB-z9E) video. LLM Chains might be the simplest chain, but they are incredibly powerful for building chatbots and automating conversations.
Introduction to LLM Chains
LLM Chains are a crucial part of FlowiseAI, as they allow you to create custom chatbots and automate conversations using various models and prompts. These chains are versatile, making them suitable for various use cases. By understanding how to create and configure LLM Chains, you can build sophisticated chatbots tailored to your needs.
Adding an LLM Chain
To get started, you need to add an LLM Chain to your chatflow. Here’s how:
1. Log in to your FlowiseAI account. 2. Navigate to the “Chatflows” tab. 3. Click on “Create Chatflow” and choose “LLM Chain” as the chain type. 4. Provide a name for your chatflow and click “Save.”
You have now created an LLM Chain, which will serve as the foundation for your chatbot.

Adding a Model
After creating an LLM Chain, you need to add a model to it. Models define the behavior and responses of your chatbot.
1. In your newly created LLM Chain, click on “Add Model.” 2. Choose the desired model from the list (e.g., OpenAI). 3. Provide an API key for the chosen model (more on that in the next section). 4. Click “Save” to add the model to your LLM Chain.
OpenAI API Key
To use the OpenAI model, you’ll need an API key. You can obtain one by following these steps:
1. Visit the [OpenAI API Keys page](https://platform.openai.com/api-keys). 2. Log in to your OpenAI account, or create a new one if you don’t have one already. 3. Click on “Create new secret key” to generate a new API key. 4. Copy the generated API key and paste it into the FlowiseAI model settings.
Viewing Credentials

To view and manage your model credentials, follow these steps:
1. In your LLM Chain, click on the model you’ve added. 2. Navigate to the “Credentials” tab. 3. Here, you can view, edit, or delete your model API keys.
Adding Prompt Template
Finally, you need to add a prompt template to your LLM Chain. This template defines how your chatbot will interact with users.
1. In your LLM Chain, click on “Add Prompt Template.” 2. Enter your desired prompt template in the text area. 3. Click “Save” to add the prompt template to your LLM Chain.
With these steps, you have successfully created a chatflow using an LLM Chain and OpenAI model. You can now test and refine your chatbot to fit your specific requirements.
Practical Examples and Applications

LLM Chains can be used for a variety of applications, such as:
– Customer support chatbots – Lead generation chatbots – FAQ chatbots – Personalized recommendation chatbots – Education and learning chatbots
By tailoring the prompt templates and models, you can create chatbots that cater to your specific use case.
Conclusion
Creating chatflows with LLM Chains and OpenAI models is a powerful way to build custom chatbots for various applications. By understanding the process and components involved, you can create sophisticated chatbots that meet your needs.
To learn more about FlowiseAI and its capabilities, check out the [official website](https://flowise.ai/) and join the [Discord community](https://discord.gg/VwHZzbNawh) to chat with like-minded individuals. You can also [hire Leon van Zyl](https://www.cognaitiv.ai) to build chatbots for you.
Happy chatbot building!