public final class Generation extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Generation.Models |
| 构造器和说明 |
|---|
Generation() |
Generation(String protocol) |
Generation(String protocol,
String baseUrl) |
Generation(String protocol,
String baseUrl,
ConnectionOptions connectionOptions) |
| 限定符和类型 | 方法和说明 |
|---|---|
GenerationResult |
call(HalfDuplexServiceParam param)
Call the server to get the whole result, only http protocol
|
void |
call(HalfDuplexServiceParam param,
ResultCallback<GenerationResult> callback)
Call the server to get the result in the callback function.
|
io.reactivex.Flowable<GenerationResult> |
streamCall(HalfDuplexServiceParam param)
Call the server to get the result by stream. http and websocket.
|
void |
streamCall(HalfDuplexServiceParam param,
ResultCallback<GenerationResult> callback) |
public Generation()
public Generation(String protocol)
public Generation(String protocol, String baseUrl, ConnectionOptions connectionOptions)
public GenerationResult 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<GenerationResult> 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<GenerationResult> 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<GenerationResult> callback) throws ApiException, NoApiKeyException, InputRequiredException
Copyright © 2025. All rights reserved.