MyGit

v0.3.0

linux-china/chatgpt-spring-boot-starter

版本发布时间: 2023-06-22 15:47:58

linux-china/chatgpt-spring-boot-starter最新发布版本:v0.8.0(2024-08-07 22:38:36)

ChatGPT interface support with functions built-in.


@GPTExchange
public interface GPTHelloService {

    @ChatCompletion("You are a language translator, please translate the below text to Chinese.\n")
    Mono<String> translateIntoChinese(String text);

    @ChatCompletion("You are a language translator, please translate the below text from {0} to {1}.\n {2}")
    Mono<String> translate(String sourceLanguage, String targetLanguage, String text);
}

Create ChatGPT interface service bean:

    @Bean
    public GPTHelloService gptHelloService(ChatGPTServiceProxyFactory proxyFactory) {
        return proxyFactory.createClient(GPTHelloService.class);
    }

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-06-22发行的版本