Skip to content

Commit

Permalink
v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RainEggplant committed Mar 2, 2023
1 parent 2c47713 commit 649353a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -9,6 +9,15 @@ A ChatGPT bot for Telegram based on Node.js. Support both browserless and browse

<strong>🎉 v2 has been released!</strong>

<details open>
<summary><b>🔔 Mar. 02, 2023 (v2.3.0)</b></summary>

> - 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.
</details>

<details open>
<summary><b>🔔 Feb. 28, 2023 (v2.2.0)</b></summary>

Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chatgpt-telegram-bot",
"version": "2.2.0",
"version": "2.3.0",
"description": "",
"main": "index.js",
"type": "module",
Expand Down
1 change: 0 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ function loadConfig(): Config {
let fetchFn: FetchFn | undefined = undefined;
const proxy = tryGet<string>('proxy') || process.env.http_proxy;
if (proxy) {
console.log('Use proxy: ' + proxy);
const proxyAgent = new HttpsProxyAgent(proxy);
fetchFn = ((url, opts) =>
fetch(
Expand Down

0 comments on commit 649353a

Please sign in to comment.