Coder Social home page Coder Social logo

gpt-3.5-turbo-telegrambot's Introduction

GPT-3.5-Turbo Telegram Bot

Telegram GPT-3.5-Turbo Bot to help you during every-day situation where you cannot just open your browser. This uses the API and therefore more or less has priority access, but after your free 18$ are depleted you will have to buy some. This means we can get very fast replies and the price is incredibly low. $0.002 / 1K tokens while some messages stay below a few hundred.

I still recommend using the web-interface when possible, it's free.


Requirements:

OpenAI API key

  • these are not 100% free!

Telegram Bot Token

  • from Botfather

Telegram ChatID

YOU NEED TO SET A USERNAME ON TELEGRAM - This is how the bot identifies you. I tried catching the exception but couldn't test it.


Working commands:

/newtopic

  • Wipes chat(for the AI, you can still see). Should help if you error with "more than 4096 Tokens" error

/setprompt

  • Will let you set a new system prompt from chat. It's fun to switch the AI's characters up every now and then.

/help - What do you expect?

/start

  • Same as help, kinda?

Non working commands:

/settemperature

  • Set the temperature(Default is 0.7)

/setfrequencypenalty

  • Set the frequency penalty(Default is 0.1)

/setpresencepenalty

  • Set the presence penalty(Default is 0.1)

For now you'll have to adjust these in the script. (Line 133-135)


Tips/Known errors

If you error out with "tried to use more than 4096 Tokens" please run /newtopic to wipe your chat. As far as I can tell it will take your previous messages into consideration and blow up the Token count sooner or later.

Please beware of the OpenAI regulations and default moderations. You can get your account banned if you get flagged. (Hard to do these days, moderation is pretty strong)


Thanks OpenAI and Dan for helping me.

Thanks to the random guy I yoinked parts of the code from. <3

gpt-3.5-turbo-telegrambot's People

Contributors

u2ezneko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.