public final class GeneralHalfDuplexApi extends Object
| 构造器和说明 |
|---|
GeneralHalfDuplexApi() |
GeneralHalfDuplexApi(ApiServiceOption serviceOption,
ConnectionOptions connectionOptions) |
GeneralHalfDuplexApi(String protocol) |
| 限定符和类型 | 方法和说明 |
|---|---|
DashScopeResult |
call(HalfDuplexServiceParam param)
Call the server to get the whole result, only http protocol
|
void |
call(HalfDuplexServiceParam param,
ResultCallback<DashScopeResult> callback)
Call the server to get the result in the callback function.
|
io.reactivex.Flowable<DashScopeResult> |
streamCall(HalfDuplexServiceParam param)
Call the server to get the result by stream. http and websocket.
|
void |
streamCall(HalfDuplexServiceParam param,
ResultCallback<DashScopeResult> callback) |
public GeneralHalfDuplexApi()
public GeneralHalfDuplexApi(String protocol)
public GeneralHalfDuplexApi(ApiServiceOption serviceOption, ConnectionOptions connectionOptions)
public DashScopeResult call(HalfDuplexServiceParam param) throws ApiException, NoApiKeyException, InputRequiredException
param - The input param of class `ConversationParam`.NoApiKeyException - Can not find api keyInputRequiredException - Missing inputs.ApiExceptionpublic void call(HalfDuplexServiceParam param, ResultCallback<DashScopeResult> callback) throws ApiException, NoApiKeyException, InputRequiredException
param - The input param of class `GenerationParam`.callback - The callback to receive response, the template class is `GenerationResult`.NoApiKeyException - Can not find api keyApiException - The request failed, possibly due to a network or data error.InputRequiredException - Missing inputs.public io.reactivex.Flowable<DashScopeResult> streamCall(HalfDuplexServiceParam param) throws ApiException, NoApiKeyException, InputRequiredException
param - The input param of class `ConversationParam`.NoApiKeyException - Can not find api keyApiException - The request failed, possibly due to a network or data error.InputRequiredException - Missing inputs.public void streamCall(HalfDuplexServiceParam param, ResultCallback<DashScopeResult> callback) throws ApiException, NoApiKeyException, InputRequiredException
Copyright © 2025. All rights reserved.