From 8f3068f1c0ad109d58be19ae2774e7e610550400 Mon Sep 17 00:00:00 2001 From: Qodi <102938592+QodiCat@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:10:35 +0800 Subject: [PATCH] Update openai.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加环境变量,支持OPENAI_API_BASE 支持中转站 --- lightrag/llm/openai.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightrag/llm/openai.py b/lightrag/llm/openai.py index d9939809..68b92e83 100644 --- a/lightrag/llm/openai.py +++ b/lightrag/llm/openai.py @@ -81,6 +81,8 @@ def create_openai_async_client( if base_url is not None: merged_configs["base_url"] = base_url + else: + merged_configs["base_url"] = os.environ["OPENAI_API_BASE"] return AsyncOpenAI(**merged_configs)