Skip to content

Telegram bot that uses AI to generate full codebases from user prompts, providing structured, ready-to-deploy software projects, differentiating from simple code generation by offering entire architectural solutions.

License

Notifications You must be signed in to change notification settings

hschickdevs/Telegram-AI-Software-Architect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Made with Python3 Stargazers GPLv3 License


Logo

Telegram-AI-Software-Architect

A powerful Telegram bot that uses large language models (LLMs) to architect fully structured, ready-to-deploy software codebases from user prompts in a matter of seconds.

Notable Features:

Single model call for generation to reduce token cost

Supports OpenAI and Claude LLMs

Output zip includes requirement and readme files for setup & usage

Learn More »

Try Demo · Deployment · Commands · Contribute

About the Project

PRODUCT DEMO/GIF

This Telegram bot leverages the power of OpenAI or Claude's large language models to provide full architectured software solutions, zipped and ready to go in your convenient Telegram chat window. The output includes requirement and readme files for easy setup and usage. The bot is capable of generating codebases for a wide range of software projects, from simple command-line applications to complex web applications.

Here is an example of a codebase that was architected for another todo-app software, given a more detailed context:

todo-app/
├── README.md
├── requirements.txt
└── src/
    ├── app.py
    ├── database.py
    ├── schema.sql
    ├── todo.py
    ├── static/
    │   ├── css/
    │   │   └── styles.css
    │   └── js/
    │       └── app.js
    └── templates/
        ├── base.html
        └── index.html

Just simply prompt the bot with a detailed description of the software you want to build, and it will generate and send the zipped software codebase the Telegram chat.

💡 Tip: The Claude 3 Opus model has proven to be exceptionally more effective at generating the codebases than even the best OpenAI GPT models.

Deployment

To get your own local instance of the Telegram-AI-Software-Architect bot up and running, follow these simple steps:

Prerequisites

  1. Before you continue, you will need to secure either an OpenAI API key or an Anthropic Claude API key.

    Option a. Get an OpenAI API key using this guide for reference.

    Option b. Get a Claude API key using this link for reference.

    💸 Before sure to review pricing for the APIs in deciding which model to use.

  2. Choose your preferred model to use for the bot.

    If you are using OpenAI, it is recommended to use the latest gpt4 model. If you are using Claude, it is recommended to use the Claude 3 Opus model. The process of generating entire codebases is very complex and requires advanced LLMs. In this case, paying for the best model is worth it.

    You will need to find the model code for these. For example, the latest version of the Claude 3 Opus model's code is claude-3-opus-20240229.

  3. Create a new Telegram bot and get the bot token using BotFather. If you don't know how to do so, you can use this guide for reference.

Make sure that you have saved your model APIKEY, model code, and bot token in a safe place. You will need them in the next steps.

Installation & Setup

Before continuing, ensure that you have docker installed on your system. If you do not, you can download it 🔗 here.

Once you have verified your Docker installation:

  1. Pull the Docker image from Docker Hub:

    docker pull hschickdevs/ai-software-architect:latest
  2. Run the Docker image:

    In specifying the environment variables in the run command, as seen adjacent to -e, you can use the following reference:

    • API_KEY: Your API KEY for the model that you chose (OpenAI or Claude)
    • BOT_TOKEN: Your Telegram bot token received from BotFather.
    • MODEL: The model that you are using, currently only openai or claude
    • MODEL_CODE (optional): The code for the model that you want to use, see Prerequisites for more information. If this is left blank, it will use the default model for your model (gpt-4-0125-preview for openai, and claude-3-opus-20240229 for claude.)
    docker run -d --name ai-software-architect \
      -e API_KEY=<YOUR_APIKEY> \
      -e BOT_TOKEN=<YOUR_TELEGRAM_BOT_TOKEN> \
      -e MODEL=<LLM-MODEL> \
      -e MODEL_CODE=<LLM_MODEL_CODE> \
      hschickdevs/ai-software-architect
  3. View the logs:

    docker logs -f ai-software-architect

    You can also attach to the container to see the logs in real-time:

    docker attach ai-software-architect

    If you don't see any errors, the bot should now be running! Head to your bot on Telegram and test it out.

Bot Commands

/help

Returns all available commands and their descriptions.


/generate <context>

🛠️ Generate a software codebase given the context.

For the highest quality output, it is recommended to use the Claude 3 Opus model, as well as provide a detailed context for the software you want to be architected.

For (a very simple) example:

/generate a simple web application that allows users to create, read, update, and delete tasks. The application should be built using the Flask framework and should use a SQLite database to store the tasks.


/ask <context>

💬 Ask the model anything and receive a standard response.

For example, the following command asks the bot how Docker works:

/ask How does Docker work?


/contact

📞 Contact the developer for support or feedback.

Contributing

Contributors Issues

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you don't have any ideas, see the open issues for a list of proposed features (and known issues) to address.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under GPLv3.0, a free software license that allows you to use, modify, and distribute the software for personal and commercial use.

However, any changes you make must also be open-sourced under the same license. This ensures that derivative work remains free and open, promoting collaboration and transparency. Importantly, if you distribute the software or any modifications, you must make the source code available and clearly state any changes you've made.

Contact

Telegram: @hschickdevs

About

Telegram bot that uses AI to generate full codebases from user prompts, providing structured, ready-to-deploy software projects, differentiating from simple code generation by offering entire architectural solutions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published