diff --git a/langchain-core/src/main/java/com/hw/langchain/chat/models/openai/ChatOpenAI.java b/langchain-core/src/main/java/com/hw/langchain/chat/models/openai/ChatOpenAI.java index 7161e27df..fc02709c1 100644 --- a/langchain-core/src/main/java/com/hw/langchain/chat/models/openai/ChatOpenAI.java +++ b/langchain-core/src/main/java/com/hw/langchain/chat/models/openai/ChatOpenAI.java @@ -30,12 +30,12 @@ import lombok.Builder; import lombok.experimental.SuperBuilder; +import okhttp3.Interceptor; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -import okhttp3.Interceptor; import static com.hw.langchain.chat.models.openai.OpenAI.convertOpenAiToLangChain; import static com.hw.langchain.utils.Utils.getOrEnvOrDefault; diff --git a/langchain-core/src/main/java/com/hw/langchain/llms/openai/BaseOpenAI.java b/langchain-core/src/main/java/com/hw/langchain/llms/openai/BaseOpenAI.java index 29104cf89..f2a8df08d 100644 --- a/langchain-core/src/main/java/com/hw/langchain/llms/openai/BaseOpenAI.java +++ b/langchain-core/src/main/java/com/hw/langchain/llms/openai/BaseOpenAI.java @@ -28,9 +28,9 @@ import lombok.Builder; import lombok.experimental.SuperBuilder; +import okhttp3.Interceptor; import java.util.*; -import okhttp3.Interceptor; import static com.google.common.base.Preconditions.checkArgument; diff --git a/openai-client/src/main/java/com/hw/openai/OpenAiClient.java b/openai-client/src/main/java/com/hw/openai/OpenAiClient.java index 466e2638f..458648f78 100644 --- a/openai-client/src/main/java/com/hw/openai/OpenAiClient.java +++ b/openai-client/src/main/java/com/hw/openai/OpenAiClient.java @@ -30,14 +30,13 @@ import com.hw.openai.service.OpenAiService; import com.hw.openai.utils.ProxyUtils; -import java.util.List; -import okhttp3.Interceptor; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import lombok.Builder; import lombok.Data; +import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.logging.HttpLoggingInterceptor; @@ -45,6 +44,7 @@ import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; import retrofit2.converter.jackson.JacksonConverterFactory; +import java.util.List; import java.util.concurrent.TimeUnit; /** @@ -121,7 +121,7 @@ public OpenAiClient init() { HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(LOG::debug); loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); httpClientBuilder.addInterceptor(loggingInterceptor); - if(this.interceptorList != null) { + if (this.interceptorList != null) { this.interceptorList.forEach(httpClientBuilder::addInterceptor); }