From 649353a85087303630f780e475bf1679ddbbcac9 Mon Sep 17 00:00:00 2001 From: RainEggplant Date: Thu, 2 Mar 2023 23:54:42 +0800 Subject: [PATCH] v2.3.0 --- README.md | 23 ++++++++++++++++------- package.json | 2 +- src/utils.ts | 1 - 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e9877bd..fa2665a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ChatGPT Telegram Bot -![badge:version](https://img.shields.io/badge/version-2.2.0-brightgreen) +![badge:version](https://img.shields.io/badge/version-2.3.0-brightgreen) ![license](https://img.shields.io/badge/license-MIT-green) A ChatGPT bot for Telegram based on Node.js. Support both browserless and browser-based APIs. @@ -9,6 +9,15 @@ A ChatGPT bot for Telegram based on Node.js. Support both browserless and browse 🎉 v2 has been released! +
+ 🔔 Mar. 02, 2023 (v2.3.0) + + > - Support the [official OpenAI chat completions API](https://platform.openai.com/docs/guides/chat). + > - Support proxy by using a custom fetch function. + + We strongly advice you to use the `official` API. There are rumors that OpenAI may ban your account if you continue to use the `unofficial` API. +
+
🔔 Feb. 28, 2023 (v2.2.0) @@ -80,13 +89,13 @@ A ChatGPT bot for Telegram based on Node.js. Support both browserless and browse > Thank @transitive-bullshit for making this easy-to-understand table! -| Type | Free? | Robust? | Quality? | -| -------------| ------ | -------- | ----------------- | -| `official` | ❌ No | ✅ Yes | ☑️ Mimics ChatGPT | -| `unofficial` | ✅ Yes | ☑️ Maybe | ✅ Real ChatGPT | -| `browser` | ✅ Yes | ❌ No | ✅ Real ChatGPT | +| Type | Free? | Robust? | Quality? | +| -------------| ------ | -------- | ----------------------- | +| `official` | ❌ No | ✅ Yes | ✅ Real ChatGPT models | +| `unofficial` | ✅ Yes | ☑️ Maybe | ✅ Real ChatGPT | +| `browser` | ✅ Yes | ❌ No | ✅ Real ChatGPT | -- `official`: Uses `text-davinci-003` to mimic ChatGPT via the official OpenAI completions API (most robust approach, but it's not free and doesn't use a model fine-tuned for chat) +- `official`: Uses the `gpt-3.5-turbo` model with the official OpenAI chat completions API (official, robust approach, but it's not free) - `unofficial`: Uses an unofficial proxy server to access ChatGPT's backend API in a way that circumvents Cloudflare (uses the real ChatGPT and is pretty lightweight, but relies on a third-party server and is rate-limited) - `browser` (not recommended): Uses Puppeteer to access the official ChatGPT webapp (uses the real ChatGPT, but very flaky, heavyweight, and error prone) diff --git a/package.json b/package.json index 35e4032..d832286 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chatgpt-telegram-bot", - "version": "2.2.0", + "version": "2.3.0", "description": "", "main": "index.js", "type": "module", diff --git a/src/utils.ts b/src/utils.ts index c3ecf10..7479341 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -17,7 +17,6 @@ function loadConfig(): Config { let fetchFn: FetchFn | undefined = undefined; const proxy = tryGet('proxy') || process.env.http_proxy; if (proxy) { - console.log('Use proxy: ' + proxy); const proxyAgent = new HttpsProxyAgent(proxy); fetchFn = ((url, opts) => fetch(