Class BaiduApi
java.lang.Object
com.bytedesk.ai.springai.providers.baidu.BaiduApi
重构API配置
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.ai.openai.api.OpenAiApi
创建适用于百度智能云的OpenAiApi实例static org.springframework.ai.openai.api.OpenAiApi
create
(String baseUrl, String apiKey, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler) 创建适用于百度智能云的OpenAiApi实例
-
Constructor Details
-
BaiduApi
private BaiduApi()
-
-
Method Details
-
create
创建适用于百度智能云的OpenAiApi实例- Parameters:
baseUrl
- 百度智能云API的基础URLapiKey
- API密钥- Returns:
- 配置好的OpenAiApi实例
-
create
public static org.springframework.ai.openai.api.OpenAiApi create(String baseUrl, String apiKey, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler) 创建适用于百度智能云的OpenAiApi实例- Parameters:
baseUrl
- 百度智能云API的基础URLapiKey
- API密钥restClientBuilder
- RestClient构建器webClientBuilder
- WebClient构建器responseErrorHandler
- 响应错误处理程序- Returns:
- 配置好的OpenAiApi实例
-