Skip to content
Telegram bot integr...
 
Notifications
Clear all

Telegram bot integration with OpenAI

5 Posts
2 Users
0 Reactions
3 Views
Andyshelby
(@andyshelby)
Posts: 3
Active Member
Topic starter
 

How can I connect my Telegram bot with the OpenAI API to generate images using callin.io? Could you offer a step-by-step tutorial for achieving this?

 
Posted : 03/04/2023 11:25 am
Callinetic
(@callinetic)
Posts: 13
Active Member
 

Hi,

Based on the screenshots you provided, it appears you haven't configured the necessary parameters for the file name and file data within your Telegram module.

Glenn - Callinetic

 
Posted : 03/04/2023 11:51 am
Andyshelby
(@andyshelby)
Posts: 3
Active Member
Topic starter
 

Hi there, could you please guide me on setting the necessary parameters for file name and file data within the Telegram module?

 
Posted : 03/04/2023 3:14 pm
Callinetic
(@callinetic)
Posts: 13
Active Member
 

Hi there,

It really depends on the parameters you've configured within the OpenAI module. I suggest setting the Response Format to “Base64-encoded PNG”.

In the Telegram module, make sure to specify a file name for the image you intend to send. For the file data, you'll need to map it to the output of the OpenAI module and apply the toBinary() function, as detailed in the OpenAI module's help attribute. Here’s an illustration of how to achieve this: {{toBinary(3.data[].b64_json; "base64")}}. This process converts the base64-encoded image data into binary format, which is necessary for the Telegram API.

Hope this assists you! Feel free to ask if you have more questions.

Glenn - Callinetic

 
Posted : 03/04/2023 4:22 pm
Andyshelby
(@andyshelby)
Posts: 3
Active Member
Topic starter
 

Hi there, I've already configured the Response Format to “Base64-encoded PNG”. However, I'm unsure about how to specify the file name and data. Could you please guide me on what exactly needs to be entered?

 
Posted : 04/04/2023 12:55 am
Share: