Multiple LLMs in One Telegram Chat: Combining Groq and Google AI

A developer built a Telegram bot in which several LLMs work in the same chat at once, each pretending to be a corporate employee. The user can switch between them on request. The integration relies on free APIs: Groq (Llama) and Google AI Studio (Gemma and Gemini).

AI-processed from Habr AI; edited by Hamidun News
Multiple LLMs in One Telegram Chat: Combining Groq and Google AI
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1Groq — for Llama, with record inference speed
Key metric #2Google AI Studio — for Gemma and Gemini, with decent free tiers
Key metric #3Plain HTTP requests to connect the components

A developer from Habr built a playful Telegram bot in which several LLMs work in a single chat at the same time, each pretending to be a corporate employee. The idea started as a joke for a gathering with friends, but it quickly turned into an interesting technical case on integrating multiple models using only free APIs.

How to cram different models into one chat

The original concept was simple and fun: create a chat where several neural networks "work" at once, believing they are real corporate employees. Each model gets its own role and backstory, and the user can switch between them at any moment, asking the same question to different LLMs. This is not just parallel testing: it is an attempt to make the networks learn and stick to their personas within a single dialogue.

Where to get an API without paying

The first practical task was mundane but critical: find a stack of tools with decent free limits. The developer researched the options and settled on three main ones:

  • Groq — for Llama, with record inference speed
  • Google AI Studio — for Gemma and Gemini, with decent free tiers
  • Plain HTTP requests to connect the components

At the initial stage the code turned out relatively simple: pick a model based on the user's command, route the request to the right API, and insert the reply into the shared chat context. There was minimal logic; the difficulty lay in managing state and context for each model at the same time.

When a model forgets who it is

A funny but stubborn problem soon appeared: when switching between models, one of them would not give up its turn and simply pretended to be another, completely losing its own identity. The developer fixed most of the problem with a carefully designed system prompt that explicitly "reminds" each model who it is supposed to be in this dialogue.

However, the glitch could not be eliminated completely. The models still sometimes get confused about their roles, especially in long multi-turn dialogues. According to the developer, this is a fundamental limitation of LLMs themselves: they generate text well and imitate style, but often lose the context of their identity when attention shifts.

What this means

The case shows that a multi-model interface can be built even on free APIs, provided you put work into the architecture and prompting. Fully reliable management of context and identity is not yet achievable, but for experiments, prototyping and learning, it is more than enough.

Story

Key Questions Answered

How to cram different models into one chat?

The original concept was simple and fun: create a chat where several neural networks "work" at once, believing they are real corporate employees. Each model gets its own role and backstory, and the user can switch between them at any moment, asking the same question to different LLMs. This is not just parallel testing: it is an attempt to make the networks learn and stick to their personas within a single dialogue.

Where to get an API without paying?

The first practical task was mundane but critical: find a stack of tools with decent free limits. The developer researched the options and settled on three main ones: Groq — for Llama, with record inference speed Google AI Studio — for Gemma and Gemini, with decent free tiers Plain HTTP requests to connect the components At the initial stage the code turned out relatively simple: pick a model based on the user's command, route the request to the right API, and insert the reply into the shared chat context. There was minimal logic; the difficulty lay in managing state and co

When a model forgets who it is?

A funny but stubborn problem soon appeared: when switching between models, one of them would not give up its turn and simply pretended to be another, completely losing its own identity. The developer fixed most of the problem with a carefully designed system prompt that explicitly "reminds" each model who it is supposed to be in this dialogue. However, the glitch could not be eliminated completely. The models still sometimes get confused about their roles, especially in long multi-turn dialogues. According to the developer, this is a fundamental limitation of LLMs themselve

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…