From 974e8b65972433b3ce46b216cf835d3e0f5b859f Mon Sep 17 00:00:00 2001 From: ibrother <46293482+ibrother@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:00:45 +0800 Subject: [PATCH] Maintain compatibility for the OPENAI_API_BASE environment variable. --- bot/app.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/app.py b/bot/app.py index 2090671..652cd9f 100644 --- a/bot/app.py +++ b/bot/app.py @@ -20,7 +20,7 @@ level=logging.INFO ) -client = AsyncOpenAI() +client = AsyncOpenAI(base_url=os.getenv("OPENAI_API_BASE", "https://api.openai.com/v1")) MODEL = os.getenv("MODEL", "gpt-3.5-turbo") # Define a dictionary to store messages for each user diff --git a/pyproject.toml b/pyproject.toml index 78fe5e0..ee58838 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "chatgpt-tgbot" -version = "0.4.0" +version = "0.4.1" description = "" authors = ["ibrother "] readme = "README.md"