package cn.bugstack.chatglm; import cn.bugstack.chatglm.model.*; 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/chatglm-sdk-java * @Copyright 公众号:bugstack虫洞栈 | 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! */ public interface IOpenAiApi { String v3_completions = "api/paas/v3/model-api/{model}/sse-invoke"; String v3_completions_sync = "api/paas/v3/model-api/{model}/invoke"; @POST(v3_completions) Single completions(@Path("model") String model, @Body ChatCompletionRequest chatCompletionRequest); @POST(v3_completions_sync) Single completions(@Body ChatCompletionRequest chatCompletionRequest); String v4 = "api/paas/v4/chat/completions"; String cogview3 = "api/paas/v4/images/generations"; @POST(cogview3) Single genImages(@Body ImageCompletionRequest imageCompletionRequest); }