public class ArkService extends ArkBaseService implements ArkBaseServiceImpl
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ArkService.Builder |
| 构造器和说明 |
|---|
ArkService(ArkApi api) |
ArkService(ArkApi api,
ExecutorService executorService) |
ArkService(String apiKey) |
ArkService(String apiKey,
Duration timeout) |
ArkService(String ak,
String sk) |
ArkService(String ak,
String sk,
Duration timeout) |
| 限定符和类型 | 方法和说明 |
|---|---|
static ArkService.Builder |
builder() |
BotChatCompletionResult |
createBotChatCompletion(BotChatCompletionRequest request) |
ChatCompletionResult |
createChatCompletion(ChatCompletionRequest request) |
ChatCompletionResult |
createChatCompletion(ChatCompletionRequest request,
Map<String,String> customHeaders) |
EmbeddingResult |
createEmbeddings(EmbeddingRequest request) |
EmbeddingResult |
createEmbeddings(EmbeddingRequest request,
Map<String,String> customHeaders) |
static okhttp3.OkHttpClient |
defaultApiKeyClient(String apiKey,
Duration timeout) |
static com.fasterxml.jackson.databind.ObjectMapper |
defaultObjectMapper() |
static okhttp3.OkHttpClient |
defaultResourceStsClient(String ak,
String sk,
Duration timeout,
String region) |
static retrofit2.Retrofit |
defaultRetrofit(okhttp3.OkHttpClient client,
com.fasterxml.jackson.databind.ObjectMapper mapper,
String baseUrl) |
static <T> T |
execute(io.reactivex.Single<T> apiCall) |
void |
shutdownExecutor() |
static io.reactivex.Flowable<SSE> |
stream(retrofit2.Call<okhttp3.ResponseBody> apiCall) |
static io.reactivex.Flowable<SSE> |
stream(retrofit2.Call<okhttp3.ResponseBody> apiCall,
boolean emitDone) |
static <T> io.reactivex.Flowable<T> |
stream(retrofit2.Call<okhttp3.ResponseBody> apiCall,
Class<T> cl) |
io.reactivex.Flowable<BotChatCompletionChunk> |
streamBotChatCompletion(BotChatCompletionRequest request) |
io.reactivex.Flowable<ChatCompletionChunk> |
streamChatCompletion(ChatCompletionRequest request) |
io.reactivex.Flowable<ChatCompletionChunk> |
streamChatCompletion(ChatCompletionRequest request,
Map<String,String> customHeaders) |
public ArkService(String apiKey)
public ArkService(ArkApi api)
public ArkService(ArkApi api, ExecutorService executorService)
public static com.fasterxml.jackson.databind.ObjectMapper defaultObjectMapper()
public static okhttp3.OkHttpClient defaultApiKeyClient(String apiKey, Duration timeout)
public static okhttp3.OkHttpClient defaultResourceStsClient(String ak, String sk, Duration timeout, String region)
public static retrofit2.Retrofit defaultRetrofit(okhttp3.OkHttpClient client,
com.fasterxml.jackson.databind.ObjectMapper mapper,
String baseUrl)
public static <T> T execute(io.reactivex.Single<T> apiCall)
public static io.reactivex.Flowable<SSE> stream(retrofit2.Call<okhttp3.ResponseBody> apiCall)
public static io.reactivex.Flowable<SSE> stream(retrofit2.Call<okhttp3.ResponseBody> apiCall, boolean emitDone)
public static <T> io.reactivex.Flowable<T> stream(retrofit2.Call<okhttp3.ResponseBody> apiCall,
Class<T> cl)
public ChatCompletionResult createChatCompletion(ChatCompletionRequest request)
createChatCompletion 在接口中 ArkBaseServiceImplpublic ChatCompletionResult createChatCompletion(ChatCompletionRequest request, Map<String,String> customHeaders)
public io.reactivex.Flowable<ChatCompletionChunk> streamChatCompletion(ChatCompletionRequest request)
streamChatCompletion 在接口中 ArkBaseServiceImplpublic io.reactivex.Flowable<ChatCompletionChunk> streamChatCompletion(ChatCompletionRequest request, Map<String,String> customHeaders)
public EmbeddingResult createEmbeddings(EmbeddingRequest request)
public EmbeddingResult createEmbeddings(EmbeddingRequest request, Map<String,String> customHeaders)
public BotChatCompletionResult createBotChatCompletion(BotChatCompletionRequest request)
createBotChatCompletion 在接口中 ArkBaseServiceImplpublic io.reactivex.Flowable<BotChatCompletionChunk> streamBotChatCompletion(BotChatCompletionRequest request)
streamBotChatCompletion 在接口中 ArkBaseServiceImplpublic void shutdownExecutor()
public static ArkService.Builder builder()
Copyright © 2024. All rights reserved.