com.volcengine.ark.runtime.service.ArkApi Maven / Gradle / Ivy
package com.volcengine.ark.runtime.service;
import com.volcengine.ark.runtime.Const;
import com.volcengine.ark.runtime.model.bot.completion.chat.BotChatCompletionRequest;
import com.volcengine.ark.runtime.model.bot.completion.chat.BotChatCompletionResult;
import com.volcengine.ark.runtime.model.completion.chat.ChatCompletionRequest;
import com.volcengine.ark.runtime.model.completion.chat.ChatCompletionResult;
import com.volcengine.ark.runtime.model.embeddings.EmbeddingRequest;
import com.volcengine.ark.runtime.model.embeddings.EmbeddingResult;
import com.volcengine.ark.runtime.model.tokenization.TokenizationRequest;
import com.volcengine.ark.runtime.model.tokenization.TokenizationResult;
import okhttp3.ResponseBody;
import retrofit2.http.*;
import retrofit2.Call;
import io.reactivex.Single;
import java.util.Map;
public interface ArkApi {
@POST("/api/v3/chat/completions")
Single createChatCompletion(@Body ChatCompletionRequest request, @Header(Const.REQUEST_MODEL) String model, @HeaderMap Map customHeaders);
@Streaming
@POST("/api/v3/chat/completions")
Call createChatCompletionStream(@Body ChatCompletionRequest request, @Header(Const.REQUEST_MODEL) String model, @HeaderMap Map customHeaders);
@POST("/api/v3/bots/chat/completions")
Single createBotChatCompletion(@Body BotChatCompletionRequest request, @Header(Const.REQUEST_BOT) String botId, @HeaderMap Map customHeaders);
@Streaming
@POST("/api/v3/bots/chat/completions")
Call createBotChatCompletionStream(@Body BotChatCompletionRequest request, @Header(Const.REQUEST_BOT) String botId, @HeaderMap Map customHeaders);
@POST("/api/v3/embeddings")
Single createEmbeddings(@Body EmbeddingRequest request, @Header(Const.REQUEST_MODEL) String model, @HeaderMap Map customHeaders);
@POST("/api/v3/tokenization")
Single createTokenization(@Body TokenizationRequest request, @Header(Const.REQUEST_MODEL) String model, @HeaderMap Map customHeaders);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy