chatgpt-spring-boot-starter
chatgpt-spring-boot-starter copied to clipboard
Help with Structured Output
trafficstars
Hi @linux-china, thanks for you hard work and this amazing repo!
- We struggle to use the Structured Output, and in the documentation it looks like we simply use a different return type than String and that would automatically make the request a function call to the output structured json format ... is that correct ? Otherwise we totally misunderstood, your implementation. Would you be able to show an example of how we can utilize the new Structured output?
@Alex793x yes, just change return type, please take a look at unit test: https://github.com/linux-china/chatgpt-spring-boot-starter/blob/5abf40473320abbdaf364fe939e05449eeaaa796/src/test/java/org/mvnsearch/chatgpt/spring/service/GPTHelloServiceTest.java#L56