public class ChatApiService extends Object
| 构造器和说明 |
|---|
ChatApiService(ChatApi api)
Creates a new ChatApiService that wraps ChatApi.
|
ChatApiService(ChatApi api,
ExecutorService executorService)
Creates a new ChatApiService that wraps ChatApi.
|
ChatApiService(okhttp3.OkHttpClient client)
Creates a new ChatApiService that wraps ChatApi
|
ChatApiService(okhttp3.OkHttpClient client,
String baseUrl)
Creates a new ChatApiService that wraps ChatApi
|
public ChatApiService(okhttp3.OkHttpClient client)
client - retrofit instancepublic ChatApiService(okhttp3.OkHttpClient client,
String baseUrl)
client - retrofit instancebaseUrl - base url of the apipublic ChatApiService(ChatApi api)
api - ChatApi instance to use for all methodspublic ChatApiService(ChatApi api, ExecutorService executorService)
Use this if you need more customization.
api - ChatApi instance to use for all methodsexecutorService - the ExecutorService from client.dispatcher().executorService()public static <T> T execute(io.reactivex.Single<T> apiCall)
public RawResponse sseExecute(Map<String,Object> request)
request - public io.reactivex.Flowable<ModelData> streamChatCompletion(Map<String,Object> request)
public EmbeddingResult createEmbeddings(Map<String,Object> request)
public QueryFileResult queryFileList(QueryFilesRequest queryFilesRequest)
public HttpxBinaryResponseContent fileContent(String fileId) throws IOException
IOExceptionpublic FileDeleted deletedFile(String fileId)
public FineTuningEvent listFineTuningJobEvents(String fineTuningJobId, Integer limit, String after)
public FineTuningJob retrieveFineTuningJob(String fineTuningJobId, Integer limit, String after)
public PersonalFineTuningJob queryPersonalFineTuningJobs(Integer limit, String after)
public FineTuningJob cancelFineTuningJob(String fineTuningJobId)
public FineTuningJob deleteFineTuningJob(String fineTuningJobId)
public FineTunedModelsStatus deleteFineTuningModel(String fineTunedModel)
public File uploadFile(UploadFileRequest request) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic ImageResult createImage(Map<String,Object> request)
public FineTuningJob createFineTuningJob(FineTuningJobRequest request)
public Batch batchesCreate(BatchCreateParams batchCreateParams)
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 com.fasterxml.jackson.databind.ObjectMapper defaultObjectMapper()
public static retrofit2.Retrofit defaultRetrofit(String baseUrl, okhttp3.OkHttpClient client, com.fasterxml.jackson.databind.ObjectMapper mapper)
Copyright © 2024. All rights reserved.