public final class SynchronizeFullDuplexApi<ParamT extends FullDuplexServiceParam> extends Object
| 构造器和说明 |
|---|
SynchronizeFullDuplexApi(ApiServiceOption serviceOptions)
Create default http client.
|
SynchronizeFullDuplexApi(ConnectionOptions connectionOptions,
ApiServiceOption serviceOptions)
Create custom http client
|
| 限定符和类型 | 方法和说明 |
|---|---|
io.reactivex.Flowable<DashScopeResult> |
duplexCall(ParamT param)
Call the server to get the result by stream.
|
void |
duplexCall(ParamT param,
ResultCallback<DashScopeResult> callback)
Call the server to get the result by stream.
|
DashScopeResult |
streamIn(ParamT param)
Call the server to get the whole result.
|
void |
streamIn(ParamT param,
ResultCallback<DashScopeResult> callback)
Call the server to get the result in the callback function.
|
public SynchronizeFullDuplexApi(ApiServiceOption serviceOptions)
serviceOptions - The service option.public SynchronizeFullDuplexApi(ConnectionOptions connectionOptions, ApiServiceOption serviceOptions)
connectionOptions - The client option.serviceOptions - The service option.public DashScopeResult streamIn(ParamT param) throws ApiException, NoApiKeyException
param - The input param, should be the subclass of `ConversationParam`.NoApiKeyException - Can not find api keyApiException - The request failed, possibly due to a network or data error.public void streamIn(ParamT param, ResultCallback<DashScopeResult> callback) throws ApiException, NoApiKeyException
param - The input param, should be the subclass of `Param`.callback - The callback to receive response, should be the subclass of `Result`.NoApiKeyException - Can not find api keyApiException - The request failed, possibly due to a network or data error.public io.reactivex.Flowable<DashScopeResult> duplexCall(ParamT param) throws ApiException, NoApiKeyException
param - The input param, should be the subclass of `Param`.NoApiKeyException - Can not find api keyApiException - The request failed, possibly due to a network or data error.public void duplexCall(ParamT param, ResultCallback<DashScopeResult> callback) throws ApiException, NoApiKeyException
param - The input param, should be the subclass of `Param`.callback - The result callback.NoApiKeyException - Can not find api keyApiException - The request failed, possibly due to a network or data error.Copyright © 2024. All rights reserved.