|
@@ -2,10 +2,7 @@ package com.qmth.boot.core.ai.client;
|
|
|
|
|
|
import com.qmth.boot.core.ai.config.LlmApiConfiguration;
|
|
|
import com.qmth.boot.core.ai.model.AiConstants;
|
|
|
-import com.qmth.boot.core.ai.model.llm.ChatChoice;
|
|
|
-import com.qmth.boot.core.ai.model.llm.ChatRequest;
|
|
|
-import com.qmth.boot.core.ai.model.llm.LlmAppType;
|
|
|
-import com.qmth.boot.core.ai.model.llm.PromptTemplate;
|
|
|
+import com.qmth.boot.core.ai.model.llm.*;
|
|
|
import com.qmth.boot.core.retrofit.annotatioin.RetrofitClient;
|
|
|
import com.qmth.boot.core.retrofit.utils.SignatureInfo;
|
|
|
import retrofit2.http.Body;
|
|
@@ -13,14 +10,22 @@ import retrofit2.http.Header;
|
|
|
import retrofit2.http.POST;
|
|
|
import retrofit2.http.Tag;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
/**
|
|
|
* 大模型应用服务接口
|
|
|
*/
|
|
|
@RetrofitClient(configuration = LlmApiConfiguration.class)
|
|
|
public interface LlmApiClient {
|
|
|
|
|
|
+ /**
|
|
|
+ * 大模型接口余额查询
|
|
|
+ *
|
|
|
+ * @param signature 使用机构AK构造Secret类型签名
|
|
|
+ * @param type 大模型应用类型
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @POST(AiConstants.LLM_BALANCE_PATH)
|
|
|
+ LlmAppBalance balance(@Tag SignatureInfo signature, @Header(AiConstants.LLM_APP_TYPE_HEADER) LlmAppType type);
|
|
|
+
|
|
|
/**
|
|
|
* 大模型chat类型请求
|
|
|
*
|
|
@@ -30,7 +35,7 @@ public interface LlmApiClient {
|
|
|
* @return
|
|
|
*/
|
|
|
@POST(AiConstants.LLM_CHAT_PATH)
|
|
|
- List<ChatChoice> chat(@Tag SignatureInfo signature, @Header(AiConstants.LLM_APP_TYPE_HEADER) LlmAppType type,
|
|
|
+ ChatResult chat(@Tag SignatureInfo signature, @Header(AiConstants.LLM_APP_TYPE_HEADER) LlmAppType type,
|
|
|
@Body ChatRequest request);
|
|
|
|
|
|
/**
|