|
@@ -3,6 +3,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.*;
|
|
|
+import com.qmth.boot.core.ai.model.llm.endpoint.ChatEndpoint;
|
|
|
import com.qmth.boot.core.retrofit.annotatioin.RetrofitClient;
|
|
|
import com.qmth.boot.core.retrofit.utils.SignatureInfo;
|
|
|
import retrofit2.http.Body;
|
|
@@ -16,6 +17,20 @@ import retrofit2.http.Tag;
|
|
|
@RetrofitClient(configuration = LlmApiConfiguration.class)
|
|
|
public interface LlmApiClient {
|
|
|
|
|
|
+ /**
|
|
|
+ * 构建大模型chat类型请求信息
|
|
|
+ *
|
|
|
+ * @param baseUrl 接口前缀地址,默认取配置文件的值(选填)
|
|
|
+ * @param signature 使用机构AK构造Secret类型签名
|
|
|
+ * @param type 大模型应用类型
|
|
|
+ * @param param 模版变量
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @POST(AiConstants.LLM_CHAT_ENDPOINT_PATH)
|
|
|
+ ChatEndpoint chatEndpoint(@Header(AiConstants.BASE_URL) String baseUrl, @Tag SignatureInfo signature,
|
|
|
+ @Header(AiConstants.LLM_APP_TYPE) LlmAppType type,
|
|
|
+ @Body Object param);
|
|
|
+
|
|
|
/**
|
|
|
* 大模型chat类型请求
|
|
|
*
|