diff --git a/src/main/java/cn/bugstack/chatglm/IOpenAiApi.java b/src/main/java/cn/bugstack/chatglm/IOpenAiApi.java new file mode 100644 index 0000000000000000000000000000000000000000..53058ce6f979f8674426e7027e448be07ab84775 --- /dev/null +++ b/src/main/java/cn/bugstack/chatglm/IOpenAiApi.java @@ -0,0 +1,23 @@ +package cn.bugstack.chatglm; + +import cn.bugstack.chatglm.model.ChatCompletionRequest; +import cn.bugstack.chatglm.model.ChatCompletionResponse; +import io.reactivex.Single; +import retrofit2.http.Body; +import retrofit2.http.POST; +import retrofit2.http.Path; + +/** + * @author 小傅哥,微信:fustack + * @description OpenAi 接口,用于扩展通用类服务 + * @github https://github.com/fuzhengwei + * @Copyright 公众号:bugstack虫洞栈 | 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! + */ +public interface IOpenAiApi { + + String v3_completions = "api/paas/v3/model-api/{model}/sse-invoke"; + + @POST(v3_completions) + Single completions(@Path("model") String model, @Body ChatCompletionRequest chatCompletionRequest); + +}