Class SynchronizeHalfDuplexApi<ParamT extends HalfDuplexParamBase>
java.lang.Object
com.alibaba.dashscope.legacy_2x.api.SynchronizeHalfDuplexApi<ParamT>
@Deprecated
public final class SynchronizeHalfDuplexApi<ParamT extends HalfDuplexParamBase>
extends Object
Deprecated.
Dashscope synchronize half duplex request processing, both http and websocket support.
-
Constructor Summary
ConstructorsConstructorDescriptionSynchronizeHalfDuplexApi(ConnectionOptions connectionOptions, ServiceOption serviceOptions) Deprecated.Create custom clientSynchronizeHalfDuplexApi(ServiceOption serviceOptions) Deprecated.Create default client, http or websocket. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Call the server to get the whole result.voidcall(ParamT param, ResultCallback<DashScopeResult> callback) Deprecated.Call the server to get the result in the callback function.booleanDeprecated.io.reactivex.Flowable<DashScopeResult>streamCall(ParamT param) Deprecated.Call the server to get the result by stream.voidstreamCall(ParamT param, ResultCallback<DashScopeResult> callback) Deprecated.Call the server to get the result by stream.
-
Constructor Details
-
SynchronizeHalfDuplexApi
Deprecated.Create default client, http or websocket.- Parameters:
serviceOptions- The service option.
-
SynchronizeHalfDuplexApi
Deprecated.Create custom client- Parameters:
connectionOptions- The client option.serviceOptions- The api service option.
-
-
Method Details
-
call
Deprecated.Call the server to get the whole result.- Parameters:
param- The input param, should be the subclass of `ConversationParam`.- Returns:
- The output structure, should be the subclass of `ConversationResult`.
- Throws:
NoApiKeyException- Can not find api keyApiException- The request failed, possibly due to a network or data error.
-
call
public void call(ParamT param, ResultCallback<DashScopeResult> callback) throws ApiException, NoApiKeyException Deprecated.Call the server to get the result in the callback function.- Parameters:
param- The input param, should be the subclass of `Param`.callback- The callback to receive response, should be the subclass of `Result`.- Throws:
NoApiKeyException- Can not find api keyApiException- The request failed, possibly due to a network or data error.
-
streamCall
public io.reactivex.Flowable<DashScopeResult> streamCall(ParamT param) throws ApiException, NoApiKeyException Deprecated.Call the server to get the result by stream.- Parameters:
param- The input param, should be the subclass of `Param`.- Returns:
- A `Flowable` of the output structure, which is the subclass of `Result`.
- Throws:
NoApiKeyException- Can not find api keyApiException- The request failed, possibly due to a network or data error.
-
streamCall
public void streamCall(ParamT param, ResultCallback<DashScopeResult> callback) throws ApiException, NoApiKeyException Deprecated.Call the server to get the result by stream.- Parameters:
param- The input param, should be the subclass of `Param`.callback- The result callback.- Throws:
NoApiKeyException- Can not find api keyApiException- The request failed, possibly due to a network or data error.
-
close
Deprecated.
-