Deploy this function on flows.network, and you will get a Telegram 🤖 to interact with your OpenAI applications based on the Assitant APIs. It helps expand the usage of your Assistants apps and connect the app with your audiences. It's an essential but simple step to make your Assistant apps in production.
This flow function (or 🤖) will be triggered when a new message is sent to the Telegram bot. Then, the flow function will create a new thread for this user, call the retrieval API from OpenAI's Assistants, and finally answer the user's questions. The user can also type /restart
to the bot to create a new thread.
- Create a bot from a template
- Configure the Configurations
Before we start, you need to create an Assistants app with the OpenAI playground. The OpenAI's Assistant basically is a RAG-based LLM agent. You can upload your own knowledge base to customize the Assistant's behavior and make sure the assistant provides correct answers. After that, you can easily see your assistant ID beginning with asst_
on the dashboard. You will need to bring your own OpenAI API key.
You will also need to sign into flows.network from your GitHub account. It is free.
Just click here to load the template.
Review the four configurations.
Congiguration | Description |
---|---|
ASSISTANT_ID | Get the Assistant ID from the OpenAI Assistants dashboard |
OPENAI_API_KEY | OpenAI API key |
telegram_token | Get the Telegram token from @botfather |
Then click on the Create and Build button to continue.
We don't need to set up other SaaS providers here. Click Deploy to finish the deployment.
This is it! You are now on the flow details page waiting for the flow function to build. As soon as the flow's status becomes running
, the bot is ready to answer questions from your users!
If you don't want to use OpenAI to create embeddings for your domain knowledge, please refer to