Skip to content

Releases: linux-china/chatgpt-spring-boot-starter

0.9.0

10 Oct 14:56
Compare
Choose a tag to compare
  • OpenAIFileAPI for File operation
  • OpenAIBatchAPI for Batch operation

0.8.0

07 Aug 14:38
Compare
Choose a tag to compare

Structured Output

Please refer OpenAI Structured Outputs for detail.

First you need to define an record for structured output:

@StructuredOutput(name = "java_example")
public record JavaExample(@Parameter("explanation") String explanation, @Parameter("answer") String answer,
		@Parameter("code") String code, @Parameter("dependencies") List<String> dependencies) {
}

Then you can use structured output record as return type as following:

        @ChatCompletion(system = "You are a helpful Java language assistant.")
   	Mono<JavaExample> generateJavaExample(String question);

Attention: if the return type is not Mono<String>, and it means structured output.

0.7.0

19 Jul 19:09
Compare
Choose a tag to compare

Guys, sorry for long time to update.

  • Models updated: chat(gpt-4o-mini), complete(gpt-3.5-turbo-instruct)
  • Function call: use new tools instead of function_call(deprecated)

0.6.0

10 Jul 15:00
Compare
Choose a tag to compare
  • Add embeddings and completion support
  • Refactor: move chat related classes to chat package.

0.5.1

26 Jun 02:13
Compare
Choose a tag to compare

@joshlong did lots of contribution for this release, and thanks.

  • Document updated by Josh Long
  • Project structure adjusted by Josh Long, and Spring friendly now
  • More powerful function resolution by Josh Long
  • Improved function resolution in graalvm by Josh Long
  • Prompt value could be from classpath and URL: conversation=classpath:///conversation-prompt.txt or conversation=https://example.com/conversation-prompt.txt
  • Prompt value resolve with records support

0.4.0

23 Jun 06:00
Compare
Choose a tag to compare
  • Prompt management added
  • Prompt as Lambda/Function
  • Reactive GPTFunction with Mono return type

0.3.0

22 Jun 07:47
Compare
Choose a tag to compare

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);
    }

0.2.1

20 Jun 14:25
Compare
Choose a tag to compare
  • Add proxy() API in OpenAIChatAPI.java for OpenAI REST API proxy.
  • Add OpenAIProxyController for proxy support.
  • Add PromptManager demo based on properties file

0.2.0

19 Jun 07:51
Compare
Choose a tag to compare
  • GraalVM native image support by @joshlong
  • Introduce ChatRequestBuilder to build ChatGPT request
  • Introduce ChatMessageRole enum

0.1.1

18 Jun 10:35
Compare
Choose a tag to compare

Initial release.

  • Base on Spring Boot 3.0+
  • Async with Spring Webflux
  • Support ChatGPT Chat Stream
  • Support ChatGPT functions