Skip to content

Telegram bot powered by Golang, letting you chat with the Claude AI right in your messenger!

License

Notifications You must be signed in to change notification settings

NikitosnikN/go-claude-tg-bot

Repository files navigation

Go Claude Telegram Bot

A Telegram bot that utilizes the Claude AI language model to provide interactive conversations and assistance to users.

Introduction

The Go Claude Telegram Bot is a powerful tool built using the Go programming language and the Claude AI language model. It enables users to engage in interactive conversations and receive assistance directly through their Telegram chats. Whether you need help with writing, analysis, question answering, math, or coding, Go Claude is here to assist.

Installation

Via Docker

docker run nikitosnik/go-claude-tg-bot:latest

On Local machine

  1. Clone the repository:
git clone https://github.com/NikitosnikN/go-claude-tg-bot.git
  1. Install the required dependencies:
cd go-claude-tg-bot
go mod download
  1. Build the bot:
go build
  1. Run the bot:
go run cmd/bot/main.go run

Configuration

It is possible to configure application via 2 ways:

  • via CLI arguments. Run ./bot run --help or go run cmd/bot/main.go run --help for more info.
  • via Env variables. See the table with variables below.
Variable Name Description
APP_TG_BOT_TOKEN Telegram bot token obtained from the BotFather..
APP_ANTHROPIC_API_KEY Anthropic API key.
APP_ALLOWED_USERNAMES (Optional) Allowed usernames to use bot, separated by comma. If not set, anyone can use bot.
APP_CLAUDE_MODEL (Optional) Claude model name.
APP_PROXY (Optional) Proxy URL. Used for Anthropic API only.

Usage

  1. Run bot:
./bot run
  1. Open your Telegram app and search for your bot using its username.

  2. Start a conversation with the bot and send messages to interact with the Claude AI.

  3. Use the available commands to perform specific actions or get help:

    • /start: Start the conversation with the bot
    • /help: Get a list of available commands and their descriptions
    • Send message, send only photo or send photo and message to get completion from Claude AI

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvement, please create an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License.

About

Telegram bot powered by Golang, letting you chat with the Claude AI right in your messenger!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages