Skip to content

Commit

Permalink
fix(ts): json_object type of response_format
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Feb 7, 2025
1 parent f671500 commit 01cd6a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const getJsonSchema = (responseFormat?: CompletionResponseFormat) => {
return responseFormat.json_schema?.schema
}
if (responseFormat?.type === 'json_object') {
return responseFormat.schema
return responseFormat.schema || {}
}
return null
}
Expand Down

0 comments on commit 01cd6a2

Please sign in to comment.