{"id":27302392,"url":"https://github.com/steinathan/telechatgpt","last_synced_at":"2025-04-12T02:38:52.641Z","repository":{"id":143990248,"uuid":"609924957","full_name":"steinathan/telechatgpt","owner":"steinathan","description":"This is a Telegram bot created with ChatGPT and Golang. The bot uses OpenAI's GPT-3 language model to generate responses to user messages in real-time.","archived":false,"fork":false,"pushed_at":"2024-01-07T15:44:02.000Z","size":90,"stargazers_count":17,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T02:38:48.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steinathan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-05T16:39:46.000Z","updated_at":"2024-01-12T15:07:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"6559430f-ab2f-4002-9102-238df1ca500f","html_url":"https://github.com/steinathan/telechatgpt","commit_stats":null,"previous_names":["steinathan/telechatgpt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinathan%2Ftelechatgpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinathan%2Ftelechatgpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinathan%2Ftelechatgpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinathan%2Ftelechatgpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steinathan","download_url":"https://codeload.github.com/steinathan/telechatgpt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248507201,"owners_count":21115555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-12T02:38:52.095Z","updated_at":"2025-04-12T02:38:52.636Z","avatar_url":"https://github.com/steinathan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram Bot with ChatGPT and Golang\n\nThis is a Telegram bot created with ChatGPT and Golang. The bot uses OpenAI's GPT-3 language model to generate responses to user messages in real-time.\n\n## Prerequisites\nTo build and run this application, you'll need to have the following software installed on your system:\n\n- Go\n\n## Features\n- Generates human-like responses to user messages using ChatGPT API\n- Persisting of user messages with sqlite\n- Telegram support\n- Built with Go for fast and efficient performance?\n\nBefore you can use the bot, you'll need to create a Telegram bot using the [BotFather framework](https://t.me/botfather). Once you have created a bot and obtained an API token, you'll also need an [API key from OpenAI](https://platform.openai.com/account/api-keys)\n\nThis is an example `.env` file\n```.env\nTELEGRAM_API_KEY=\"\"\nOPENAI_TOKEN=\"\"\nRETAIN_HISTORY=\"false\"\n\n```\n`RETAIN_HISTORY=\"true\"` submits the previous conversations with the current text, [see here](https://platform.openai.com/docs/guides/chat/introduction), but when false, it only sends the prompt + the current users text, this reduces the amount of tokens been send per request.\n\ncreate a `prompt.txt` or rename the example file\n\n```sh\n$ mv prompt.example.txt prompt.txt\n```\nthe prompt helps you customize how the bot will react to messages\n\n\n## Example chat conversation\n![Example Image](./screenshots/scrnsht1.png \"An example conversation\")\n\n## Installing\nFirst, clone this repository to your local machine:\n\n```sh\ngit clone github.com/navicstein/telechatgpt.git\n```\n\nThen, navigate to the project directory:\n\n```sh\ncd telechatgpt\n```\n\nFinally, build the project:\n\n```sh\ngo build -o /opt/telechatgpt\n```\n\n## Contributing\nIf you'd like to contribute to this project, please follow these steps:\n\n- Fork this repository.\n- Create a new branch (git checkout -b \u003cbranch-name\u003e).\n- Make your changes and commit them (git commit -am \"\u003ccommit-message\u003e\").\n- Push to the branch (git push origin \u003cbranch-name\u003e).\n- Create a new pull request\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details\n\n\n## Resources\n- [Go Documentation](https://golang.org/doc/)\n- [Telegram Bot API](https://core.telegram.org/bots/api)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinathan%2Ftelechatgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteinathan%2Ftelechatgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinathan%2Ftelechatgpt/lists"}