From 40275f82b891e779a50f580e0d9cba781a2c365c Mon Sep 17 00:00:00 2001 From: HamaWhite Date: Fri, 16 Jun 2023 10:37:10 +0800 Subject: [PATCH] fix bug --- .../main/java/com/hw/langchain/llms/openai/OpenAIChat.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langchain-core/src/main/java/com/hw/langchain/llms/openai/OpenAIChat.java b/langchain-core/src/main/java/com/hw/langchain/llms/openai/OpenAIChat.java index b8686e880..6e9a606e0 100644 --- a/langchain-core/src/main/java/com/hw/langchain/llms/openai/OpenAIChat.java +++ b/langchain-core/src/main/java/com/hw/langchain/llms/openai/OpenAIChat.java @@ -134,10 +134,10 @@ public class OpenAIChat extends BaseLLM { protected boolean streaming; public OpenAIChat init() { - openaiApiBase = Utils.getOrEnvOrDefault(openaiApiBase, "OPENAI_API_BASE"); + openaiApiBase = Utils.getOrEnvOrDefault(openaiApiBase, "OPENAI_API_BASE", ""); openaiApiKey = Utils.getOrEnvOrDefault(openaiApiKey, "OPENAI_API_KEY"); openaiOrganization = Utils.getOrEnvOrDefault(openaiOrganization, "OPENAI_ORGANIZATION", ""); - openaiProxy = Utils.getOrEnvOrDefault(openaiProxy, "OPENAI_PROXY"); + openaiProxy = Utils.getOrEnvOrDefault(openaiProxy, "OPENAI_PROXY", ""); this.client = OpenAiClient.builder() .openaiApiBase(openaiApiBase)