StefanBratanov / jvm-openai

A minimalistic OpenAI API client for the JVM, written in Java 🤖
Apache License 2.0
35 stars 8 forks source link

Return Json #15

Open workflowanalytics opened 1 week ago

workflowanalytics commented 1 week ago

When submitting a single quote message to ChatCompletionRequest, the system returns a json string which I want. When I submit a messges() array (empty system, assistant) with a quote, I get a 400 error indicating Chat Exception [400 - message: 'messages' must contain the word 'json' in some form, to use 'response_format' of type 'json_object'., type: When I supply a 'return json' in any and all of the inputs (system,assistant,prompt) I get this message.

StefanBratanov commented 1 week ago

Hi, thanks for raising. Is it possible to paste the code which fails for you here, so I can more easily replicate the issue you are having?