umputun / tg-spam

Anti-Spam bot for Telegram and anti-spam library
https://tg-spam.umputun.dev
MIT License
224 stars 39 forks source link

add basic support of openai spam checker #18

Closed umputun closed 11 months ago

umputun commented 11 months ago

This adds support of openai checks. The new set of parameters allows configuring all the expected things, like token, system prompt, modem etc. This works only in non-paranoid mode, i.e. on the first message only and after all other checks are passed. This is done to minimize the number of calls to openai and keep the price low.

all the default parameters should be fine, the only thing that needs to be set is OPENAI_TOKEN. By default it is not set and openai checks are disabled.

cloudflare-workers-and-pages[bot] commented 11 months ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: b0eeedf
Status:⚡️  Build in progress...

View logs