接口的使用
io.agentscope.core.model.transport.HttpTransport
使用HttpTransport的程序包
-
io.agentscope.core.model中HttpTransport的使用
参数类型为HttpTransport的io.agentscope.core.model中的方法修饰符和类型方法说明DashScopeHttpClient.fetchPublicKey(String apiKey, String baseUrl, HttpTransport transport) Fetch the latest RSA public key from DashScope API.DashScopeChatModel.Builder.httpTransport(HttpTransport httpTransport) Sets the HTTP transport to use.OllamaChatModel.Builder.httpTransport(HttpTransport httpTransport) OpenAIChatModel.Builder.httpTransport(HttpTransport httpTransport) Sets the HTTP transport to use.DashScopeHttpClient.Builder.transport(HttpTransport transport) Set the HTTP transport.OllamaHttpClient.Builder.transport(HttpTransport transport) 参数类型为HttpTransport的io.agentscope.core.model中的构造器限定符构造器说明DashScopeChatModel(String apiKey, String modelName, boolean stream, Boolean enableThinking, Boolean enableSearch, EndpointType endpointType, GenerateOptions defaultOptions, String baseUrl, Formatter<DashScopeMessage, DashScopeResponse, DashScopeRequest> formatter, HttpTransport httpTransport, String publicKeyId, String publicKey) Creates a new DashScope chat model instance with explicit API type.DashScopeChatModel(String apiKey, String modelName, boolean stream, Boolean enableThinking, Boolean enableSearch, GenerateOptions defaultOptions, String baseUrl, Formatter<DashScopeMessage, DashScopeResponse, DashScopeRequest> formatter, HttpTransport httpTransport, String publicKeyId, String publicKey) Creates a new DashScope chat model instance with automatic API type detection.DashScopeHttpClient(HttpTransport transport, String apiKey, String baseUrl, String publicKeyId, String publicKey) Create a new DashScopeHttpClient.OllamaChatModel(String modelName, String baseUrl, OllamaOptions defaultOptions, Formatter<OllamaMessage, OllamaResponse, OllamaRequest> formatter, HttpTransport httpTransport) Creates a new OllamaChatModel.OllamaHttpClient(HttpTransport transport, String baseUrl) Create a new OllamaHttpClient.OpenAIClient(HttpTransport transport) Create a new stateless OpenAIClient. -
io.agentscope.core.model.transport中HttpTransport的使用
修饰符和类型类说明classPure JDK implementation of the HttpTransport interface.classOkHttp implementation of the HttpTransport interface.修饰符和类型方法说明static HttpTransportHttpTransportFactory.getDefault()Get the default HttpTransport instance.修饰符和类型方法说明static booleanHttpTransportFactory.isManaged(HttpTransport transport) Check if a transport is currently managed.static voidHttpTransportFactory.register(HttpTransport transport) Register an HttpTransport for lifecycle management.static voidHttpTransportFactory.setDefault(HttpTransport transport) Set the default HttpTransport instance.static booleanHttpTransportFactory.unregister(HttpTransport transport) Unregister an HttpTransport from lifecycle management. -
io.agentscope.core.model.tts中HttpTransport的使用
修饰符和类型方法说明DashScopeTTSModel.Builder.httpTransport(HttpTransport transport) Sets the HTTP transport to use.