iGdu

耕读

Learner and Observer, be happy to share useful things.
github
tg_channel
youtube
email
follow

Based on Coze and Telegram's homemade ChatGPT-4 service

1. Introduction to Coze and Its Services#

Coze is an artificial intelligence service platform under ByteDance's overseas company (Coze domestic version is called Kouzi). This platform allows users to register for free and use six AI large models, including ChatGPT-3.5, ChatGPT-4, ChatGPT-4o, and ChatGPT-4 Turbo, as well as Gemini 1.5 Pro and Gemini 1.5 Flash.
At the same time, Coze provides a relatively sufficient number of conversation times for each user: ChatGPT-4 Turbo, 50 times per day; ChatGPT-4, 100 times per day; ChatGPT-4o, 200 times per day; other models, 500 times per day (these data come from the Coze Telegram channel).
Moreover, the platform allows users to freely customize various services: including plugins, workflows, knowledge bases, robots, etc.
The platform mainly serves overseas users, and domestic IPs cannot access Coze services based on IP recognition; while +86 numbers can register for Coze, the available models seem to be fewer (to be verified).
In any case, Coze indeed provides users with services that exceed paid standards for free during this wave of AI. The AI blueprint of Coze is referenced in the image below (source)

Byte's AI

So, how can we make good use of the artificial intelligence services provided by Coze? Below, I will explain how to build an AI service based on Coze bot and Telegram Bot using ChatGPT-4 (or other models) in three parts: Coze registration, customization of Coze Bot, and hosting or using Coze Bot. The goal of this tutorial is to create a bot named iGdux (you can customize the bot name, and readers need to reset it) that can use ChatGPT-4 and DALLE.3.

2. Coze Registration#

Prerequisite: You have access to the internet and can visit the official website of Coze.

coze0

There are two methods to register for Coze: phone number registration and Gmail registration.

coze1

You can choose to register with a virtual number like Google Voice that you control, or you can register directly with an email. As mentioned above, +86 numbers can register for the international version of Coze, but there seem to be limitations on the models. It is recommended to register with Gmail.
After registering for Coze, you need to set a username for your Coze account, limited to 4-16 characters.

coze2

3. Customizing Coze Bot#

Recommended method: directly use Coze Assistant to customize Coze Bot, and then manually modify the Coze Bot settings based on debugging or needs.

3.1 Creating Coze Bot:#

In the Coze homepage dialog box, enter the name and characteristics, functions, etc., of the bot you want to create. For example: Please help me customize a bot named iGdux (you need to reset the name yourself), whose characteristic is having extensive knowledge and being able to draw, etc. Please note that recently, Coze's new policy states that the username of self-built bots cannot contain words like ChatGPT, GPT, DALLE, Midjourney, etc., otherwise the bot will be disabled, and the data cannot be recovered. Before creating the Bot, Coze Assistant will give you a preliminary design plan and ask if you agree to create it; reply to Coze Assistant, agreeing to create it. As shown in the image:

coze auto create bot 1

In less than a minute, Coze Assistant will create the bot you want based on the Bot.

coze auto create bot 2

coze auto create bot 3

At this point, you can achieve ChatGPT-4 (or other models) conversations, drawing, and other functions on the Coze webpage.

coze auto create bot 5

3.2 Debugging and Improving Coze Bot#

3.2.1 Testing the Self-Made Coze Bot.#

According to the prompts from Coze Assistant, click the link to Coze Bot (using "iGdux" as an example) to enter the management backend of Coze Bot. In the dialog box at the bottom right, you can use the ChatGPT service.

In the dialog box at the bottom right of the Coze Bot management backend, test your self-defined Coze Bot. If you are satisfied, you can directly use iGdux (your customized bot name) on the webpage; you can also publish/host it on other platforms, see the later section for publishing methods.

3.2.2 Improving the Self-Made Coze Bot#

If the self-created Coze Bot does not perform well in tests, it needs to be improved. Ways to improve include: refining the Person & Prompt of the self-made Coze Bot; selecting models; improving plugins; and enhancing other functions.

Refining the Person & Prompt of the self-made Coze Bot. In generative AI services like ChatGPT, the persona and prompts (Person & Prompt) are very important. The same model (or even plugins) can give vastly different responses to the same question based on different personas and prompts.

To refine the Person & Prompt, you can use Coze Assistant or my created prompt master bot @PromptGuru for assistance, or you can directly copy the settings of other public bots (modify them later when you are familiar).

prompt use

Directly ask Coze Assistant or PromptGuru for examples: copy your Coze Bot (iGdux)'s Person & Prompt and inquire: I want to improve my bot iGdux, hoping that iGdux can draw, express language accurately, be logical, and humorous. Please refine based on iGdux's original Person & Prompt, and after obtaining the new Person & Prompt, test, publish, and save it for use.

prompt

Imitating (copying) the Person & Prompt of excellent Coze Bots is also a preliminary method for using Coze Bot. Imitation method: click https://www.coze.com/store/bot to enter the Coze Bot Store, select Public Config. Choose a similar target bot, click to view its settings, including Person & Prompt and plugins, etc.

learning others' prompt

Directly copy its Person & Prompt, and adjust your bot's plugins based on the settings of excellent bots, and then save the modifications through publishing.

For the selection of Coze Bot models, you can set it according to your needs. As mentioned above, Coze provides six AI large models, including ChatGPT-4 Turbo and Gemini 1.5 Pro.
To select a model, operate at the blue horizontal line in the image:

coze6

coze5

It is recommended for beginners to use the default ChatGPT-4. If you pursue precision, you can choose ChatGPT-4 Turbo or 4, but if you need to analyze images, audio, etc., it is recommended to use ChatGPT-4o. Recently, ChatGPT-4o was used to recognize and translate blurry foreign medals from decades ago, which was astonishing. Of course, you can also choose Google's Gemini model.

Plugin selection. Principle: suitable is good. More plugins are not necessarily better; be cautious when adding plugins, or it may backfire. If you only want conversation and drawing functions, you only need to add the DALLE.3 and Bing Image Search plugins.

Improving other functions. Recommendations: enable the Filebox function and Long-term Memory function.

coze8

Customizing Coze Bot actually has many in-depth play methods, such as workflows, custom plugins, and connecting your data to Notion or the international version of Feishu Lark. I haven't tried it myself, but if you're interested, you can explore it further.

4. Publishing or Hosting Coze Bot#

After modifying and debugging Coze Bot, you need to publish to save the settings; otherwise, the parameters after debugging will become invalid after refreshing the page. The most common way to publish is to click the Publish button in the upper right corner after debugging the Coze Bot, enter the Coze Bot publishing backend, select the default Coze Bot Store, and click publish again. At this point, you can save the parameters you modified and debugged for Coze Bot.

How to publish Coze Bot to Telegram or Discord? Taking publishing Coze Bot to Telegram as an example (the method for publishing to Discord is similar and can refer to Coze's official instructions). You can understand publishing Coze Bot to Telegram as letting the Telegram bot take over the Coze Bot service (providing free access to six AI models including ChatGPT and Gemini), and the way to connect is by entering the password, which is the Telegram bot Token.

4.1 Setting Coze Bot Publishing Parameters#

To publish the debugged Coze Bot iGdux to Telegram, enter the Coze Bot publishing backend, click on the settings after selecting the publishing method Telegram, and a dialog box will appear asking you to enter the Telegram Bot Token.

coze11

Obtain and save your Telegram Bot Token. First, create a Telegram bot. Method: choose to create a bot using the bot: @BotFather.

Botfather

Select the /Newbot command to create a bot, and enter your own bot username, such as mine is iGdux. Please note that Coze Bot usernames cannot contain names like ChatGPT, DALLE, etc. Previously set bots containing such names may become invalid.

coze13

Note that when Botfather asks for the name of your bot, the second time you enter it needs to end with bot or _bot. The name of the bot I created is iGdux_bot, which displays as https://t.me/iGdux_bot. The two entries for the bot name can be confusing; you need to clarify that the first entry can be changed, while the second entry, which ends with bot and has a link, cannot be changed unless you delete and recreate it. When assigning a hyperlink name to the bot, common names may be occupied by others, so try several times or use less common names to define the bot.
After creating your own Telegram bot, as shown in the image:

coze14

Copy the bot Token into the Telegram settings dialog box in the Coze Bot publishing backend and save it.

coze15

4.2 Publishing Coze Bot to Telegram#

In the Coze Bot publishing backend, check the box next to the Telegram option you just set (you can keep the default Coze Bot Store for later debugging on the Coze webpage), and click the publish button in the upper right corner of the Coze publishing page again.
At this point, Coze will inform you that the publication was successful and display the link to your created bot.

coze17

Copy it, and enable it in the search box of the Telegram app. After that, you can directly use the AI services provided by Coze Bot in Telegram.

coze18

At this point, you can directly connect to Coze Bot through the Telegram Bot to achieve your self-made ChatGPT-4 service. Before customizing your own bot, you can try using my self-made bot hosted on Telegram: @igdux_bot.

igdux use

Of course, this tutorial may seem simple, but there is a lot of room for personal exploration. If you are willing to learn, you can create plugins, or even create knowledge bases and flowcharts to make the bot understand you better and provide responses that meet your requirements.

5. Note:#

This tutorial for Coze is also applicable to Kouzi. If you need to provide customized AI customer service for your company's WeChat public account, you can try to build it based on Kouzi; only the model selection and publishing platform differ, while other steps remain the same. Kouzi provides services using its self-developed Yuque large model and the Kimi large model from the Dark Side of the Moon. Publishing platforms include WeChat public accounts, subscription accounts, Juejin, etc. You can refer to this article shared by a big shot on WeChat public account: How to Create Kouzi Intelligent Agent Automatically with Kimi?.
If you are learning English, simple chatting, etc., I highly recommend you try downloading the Kouzi mobile app Doubao, which defaults to using the Yuque model. When you customize the bot on the Kouzi web version and publish it to Doubao, you can directly use your customized bot on your mobile device. Self-made Coze bots do not carry watermarks, while Kouzi drawings will have a watermark like "Generated by Doubao."

This tutorial was actually written in two drafts. The original draft used the most cumbersome manual method to create a bot, and during the writing process, I discovered a simpler method, which is to quickly create a bot using Coze Assistant and modify parameters, so I had to discard the original draft. Thus, I rewrote, took screenshots, etc., and the tutorial gradually became what it is now presented to readers. Creating a bot may take less than 5 minutes, but writing a tutorial takes about a day or two. Writing and creating tutorials is not easy; please help by liking, sharing, and following my Telegram channel as encouragement. You can also support me: https://ko-fi.com/igdux, to provide better content. Thank you very much.

This article is synchronized with the iGengdu blog's article of the same name. For more beneficial shares, please follow my iGdux blog, iGengdu blog, and my Telegram channel.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.