You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some generative language models do not generate valid JSON when asked to do so; this JSON fails when a user tries to parse it.
Proposed Solution
For models that support it (see below), use JSON mode when a user specifies -f json for a magic command.
Additional context
As of November 6, 2023, OpenAI's gpt-4-vision-preview and gpt-3.5-turbo models support JSON mode. Clients must include the string "JSON" in their system message, and clients using these models must set response_format to { type: "json_object" }, to enable this mode.
See #435 for another issue related to generative models that fail to output valid JSON.
See #437 for using JSON mode with the /generate command.
The text was updated successfully, but these errors were encountered:
Problem
Some generative language models do not generate valid JSON when asked to do so; this JSON fails when a user tries to parse it.
Proposed Solution
For models that support it (see below), use JSON mode when a user specifies
-f json
for a magic command.Additional context
As of November 6, 2023, OpenAI's
gpt-4-vision-preview
andgpt-3.5-turbo
models support JSON mode. Clients must include the string"JSON"
in their system message, and clients using these models must setresponse_format
to{ type: "json_object" }
, to enable this mode.See #435 for another issue related to generative models that fail to output valid JSON.
See #437 for using JSON mode with the
/generate
command.The text was updated successfully, but these errors were encountered: