How to Build a Recipe Generator AI Chatbot With Coze

This comprehensive tutorial walks you through how to build an AI chatbot on the Coze platform. Visit Coze and Telegram Web to create an account. Create a Chatbot with GPT-4o Configure the bot with Google search, YouTube, and Food Calorie plugins. Testing your bot Publishing your Receipe Generator AI Chatbot via Telegram @CozeReceipeGeneratorbot or on the Coze Store

Oct 26, 2024 - 10:21
 0
How to Build a Recipe Generator AI Chatbot With Coze

Before reading, try the Recipe Generator AI Chatbot via Telegram @CozeReceipeGeneratorbot or on the Coze Store!

\

\ Start a chat with the bot with a list of foodstuffs in your fridge or kitchen, and watch it dish out random recipes you can try!

Ever find yourself looking into your fridge and around the kitchen, unsure of what to cook with the ingredients you have? Say goodbye to indecision! With Coze AI, you can build a smart recipe generator chatbot that helps you whip up delicious meals using what’s already in your kitchen.

\ This article walks you through creating a personalized AI-powered Recipe Generator assistant that suggests recipes based on your available ingredients. This will make meal planning more manageable and fun for you!

What is Coze AI?

Coze is a no-code/low-code platform developed by ByteDance that allows users to build and develop next-generation AI applications and chatbots regardless of their programming experience. These custom chatbots can be integrated into various messaging platforms such as Telegram and Discord, giving them access to powerful large language models (LLMs).

\ If you want to learn more about Coze AI, you should check out the official documentation.

TL;DR

This comprehensive tutorial walks you through how to build an AI chatbot on the Coze platform.

\

  • Create a Chatbot with GPT-4o and configure the bot with Google search, YouTube, and Food Calorie plugins.

\

  • Testing your bot.

\

Prerequisites

To follow along with this tutorial, you will need the following:

  • A Coze account. Visit the signup page to create an account.

\

  • A Telegram account. Visit Telegram Web to create an account.

Create Your First AI Bot From Scratch in Coze

To get started:

  1. Log in to Coze, and visit the Workspace tab in the left menu. You will automatically redirected to your Personal workspace.

    \

  2. Click Create Agent.

    \

  3. Personalize your bot by giving it an Agent Name and Agent Function Description. For our, I am naming it “==Recipe Generator AI Chatbot==”, with the description being “==You are a bot that helps you create receipts based on what you have. Simply tell me your ingredients, and I will give you recipe ideas based on what's available in your kitchen. Whether you're in the mood for a snack, a full meal, or a protein-packed dish tailored for your gym routine, I have options.==”

  4. Click on Icon to upload a pic. Alternatively, you can use the Optimize icon to generate an avatar using the DALL·E-3 model.

  5. Click Confirm.

Developing and Configuring Your AI Bot

After you confirm your bot creation, you will be redirected to the Develop page. This is where you configure the bot by picking its model and capabilities—does your bot need external knowledge, workflows, databases, and plugins? However, first, we need to define our bot persona and prompt. To get started:

\

  1. In the Persona & Prompt area, enter instructions. These instructions help your bot generate a response for your users. The prompt you give your bot will also determine the quality of the response.

    \

  2. Click on the Optimize icon to improve your prompt. The output is markdown text, which you can find in this GitHub gist.

    3. Next, you can change the model your bot uses. However, I will stick to the default CPT-40 (8K).

**Testing Your Chatbot

\ While there is still so much work to be done, we can test how good it is. To do this, head to the Preview and Debug panel, enter this prompt in the provided field, and click Send: ==i  got yam, egg, stew, chicken spaghetti and rice right now. what meal can i use cook? any suggestion?==

Now, that works great!

Adding More Capabilities to Our Chatbot

While the bot works fine, adding plugins can significantly improve it. Plugins are add-ons that add more functionality to an application

by calling external APIs without changing the original code.

![](https://cdn.hackernoon.com/images/6y0WVYgSxtZxyZYUrXxGRQQ48qN2-2024-10-26T02:18:30.626Z-i603cfthobdncv26zbzz92aa)

Coze's plugin store currently has over 200 plugins available for you to explore. If you don't see a plugin that fits your use case, you can always create a custom one. This comprehensive guide can help you get started on plugin building.  To add a plugin to your bot, follow these steps:

\

  1. At the plugins field, click the + icon.

    \

  2. Find the plugin you want. For example, you can search for the ==Google Web Search== plug-in, and click Add ==googlewebSearch== endpoint.

![](https://cdn.hackernoon.com/images/6y0WVYgSxtZxyZYUrXxGRQQ48qN2-2024-10-26T02:18:30.544Z-dvv7fnbt5qxmm1fupcfr5dnl)
  1. Similarly, search and add these plugins.

  2. The ==YouTube== plugin and add the ==getvideometa== and ==search_video== endpoint.

  3. The ==Food Calorie Search== plugin and add the ==Food_calories== endpoint.

    \

  4. Exit the plugin dialog box.

    \

  5. Hover on the plugin you want to use and Copy it. \n \n \n \n

  6. You can add that plugin with the Copy within your prompt. For example, add the text In the GitHub gist to the Diet-friendly Meals section of your prompt after the instructions.

    \

  7. Retest your bot with a new prompt like ==“i  got yam, egg, stew, chicken spaghetti and rice right now. what meal can I use cook? any suggestion? i want a diet meal for the gym”==

    \

  8. Click Send.

Publish Your Bot

After testing your bot and adding additional functionality to it, you can go ahead and publish it.

  1. Click on Publish on the Develop page.

  2. Click Generate to generate a Changelog.

  3. Select a publishing channel. For this article, I suggest Telegram.

  4. Visit BotFather on telegram.

  5. Start if this is your first time.

  6. Enter the /newbot command in the dialog box.

  7. Give your bot a name: CozeReceiptGenerator.

  8. Give your bot a username:  CozeReceiptGeneratorbot.

  9. Save the token BotFather returns.

  10. Click on Configure Telegram and enter the token.

  11. Tick Telegram as your publishing platform.

  12. Click Publish.

  13. Click Finish.

\

![](https://cdn.hackernoon.com/images/6y0WVYgSxtZxyZYUrXxGRQQ48qN2-2024-10-26T02:18:30.088Z-rguwir9dumz2qgjb1z190ejn)

What’s Next? Explore the Bot!

![](https://cdn.hackernoon.com/images/6y0WVYgSxtZxyZYUrXxGRQQ48qN2-2024-10-26T02:18:30.087Z-sd4x70jpa7solhqtjbop0pcu)

Try the ==Recipe Generator AI Chatbot== via Telegram @CozeReceipeGeneratorbot or on the Coze Store. Start a chat, and tell it what you have in your kitchen, and let's start cooking!

\

![](https://cdn.hackernoon.com/images/6y0WVYgSxtZxyZYUrXxGRQQ48qN2-2024-10-26T02:18:29.540Z-l2ykzhxn0tcchqyh0hjsrj8i)

\ Coze AI makes chatbot creation seamless and exciting without writing a single line of code. And if it gets to code, you can also customize your bot with plugins, data, external APIs, and databases. By leveraging Coze features, you can build AI applications that do almost anything! Learn more about the tool by exploring Coze YouTube.

\ If you have read this far, I appreciate it! You can connect with me on Twitter, LinkedIn, or iheifeanyi [at] gmail.com

\ Please do drop a like or comment.

\ Thanks, and enjoy your meal! ❤️????????????

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow

CryptoFortress Disclosure: This article does not represent investment advice. The content and materials featured on this page are for educational purposes only.