Project case study · AI assistant · Telegram

An AI assistant in the website chat: fact-based answers and enquiries in Telegram

The assistant runs on every page of tema.name. It answers visitors in five languages, relies only on published services and prices, and passes a ready enquiry to the owner in Telegram. You can test it right on this page.

  • OpenAI API
  • PHP
  • JavaScript
  • Telegram Bot API
Chat with the AI assistant on tema.name
5 languagesreply in the visitor's language
Site pricesamounts are checked against the price list in code
Spending capmonthly ceiling and alerts in Telegram

The task: fast answers without invented promises

A visitor to a service website wants to see the price, timeline and next step right away. A live reply is not always possible, and an ordinary AI chatbot easily invents amounts and conditions. The assistant has to answer fast, but only with facts.

Business task

Answer common questions at any time, promise nothing that is not on the website, and turn the conversation into an enquiry with a clear task description.

What was built

  • a chat widget on every page in 5 languages
  • a server-side API: the model key stays on the server, with session, CSRF and request origin checks
  • a structured model reply: text, language, service, short summary and enquiry readiness
  • price and language checks in code before the reply is shown
  • limits per conversation, visitor, day and month
  • notifications and enquiries for the owner in Telegram

How the assistant works

The model writes the answer and the code decides whether the visitor may see it. That is why every reply passes several checks.

01

Fact-based answers

Services, prices, timelines and the way of working come from published pages. When there is no exact answer, the assistant suggests leaving a contact.

02

Five languages

Code detects the reply language from the last message. A reply written in the wrong alphabet is never shown.

03

Price check

Every amount with a currency is compared with the list of published prices. If the amount is not in the price list, the reply is replaced with a safe one.

04

Enquiry in Telegram

When a visitor is ready to discuss a project, the assistant offers to leave a contact and the owner gets a short summary of the task.

05

Spending limits

Caps per conversation, visitor and day, a monthly budget reserved before each model call, and alerts at 80% and 100%.

06

Data security

The API key stays on the server, bots are filtered and the real IP is read behind Cloudflare. Contact details and document numbers are never sent to the model.

Test the assistant right now

The chat is available on this page. Ask what a website or a bot costs: the answer arrives in a few seconds, and the price comes only from the published price list.

The path of one message

  1. Visitor
  2. Chat widget
  3. Server: limits and filters
  4. Model: structured reply
  5. Language and price check
  6. Reply and suggestions
Enquiry → owner's TelegramOpen the assistant

What you can verify

The assistant has been running on tema.name since 25 September 2026. The number of conversations and enquiries is not published: the case shows the design and behaviour you can verify in the chat.

Key implementation facts

A short overview of the technology and of how a similar assistant is added to another website.

What is this project?

An AI assistant in the chat of a service website: it advises on services and prices and collects enquiries.

What does it run on?

PHP on the server, a JavaScript widget, the OpenAI gpt-4.1-mini model with a structured reply, and the Telegram Bot API.

Can it be added to my website?

Yes. The widget works on WordPress, Joomla and static sites, and the knowledge base is built from your pages and price list.

What does it cost to run?

One model reply costs a fraction of a cent, and spending is limited by a monthly ceiling that you set.

What does a similar assistant cost and how long does it take?

The price depends on the size of the knowledge base, the number of languages, integrations (Telegram, CRM, email) and the limits you need. I prepare a quote after a short description of the task.

AI assistant for business service

Questions about a similar assistant

What happens if the AI makes a mistake?

Prices and the reply language are checked in code. If a check fails, the visitor sees a safe reply with an offer to leave a contact.

Can enquiries go to a CRM or email?

Yes. Enquiries can be sent to Telegram, email, a CRM or several channels at once.

How do I avoid overpaying for AI?

Limits per conversation, visitor and day plus a monthly budget. When the budget runs out, the assistant switches off until the next month and the owner is notified.

Do I need a separate server?

No. The server part runs on ordinary PHP hosting next to the website, and the model key is stored only on the server.

Need an AI assistant for your website?

I will connect the assistant to your services and price list and set up limits and enquiry delivery.

Form · Chat

Describe a similar project

Explain the problem the website or tool should solve. I will reply with a suggested scope, stages and quote.