fix: respect OpenAI spec for response format (#1289)

fix: properly respect OpenAI spec for response format

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2023-11-15 19:36:23 +01:00 committed by GitHub
parent 733b612eb2
commit 66a558ff41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 4 deletions

View file

@ -65,7 +65,7 @@ func CompletionEndpoint(cm *config.ConfigLoader, o *options.Option) func(c *fibe
return fmt.Errorf("failed reading parameters from request:%w", err)
}
if input.ResponseFormat == "json_object" {
if input.ResponseFormat.Type == "json_object" {
input.Grammar = grammar.JSONBNF
}