Skip to content

Commit e2c7920

Browse files
bene2k1RoRoJnerda-codes
authored
Apply suggestions from code review
Co-authored-by: Rowena Jones <[email protected]> Co-authored-by: Néda <[email protected]>
1 parent 7ce8221 commit e2c7920

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pages/generative-apis/how-to/use-structured-outputs.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ There are several ways to interact with language models:
4040
- Type: `{"type": "json_object"}`
4141
- This mode is non-deterministic and allows the model to output a JSON object without strict validation.
4242
- Useful for flexible outputs when you expect the model to infer a reasonable structure based on your prompt.
43-
- JSON mode is older and has been used by developers since early API implementations but lack reliability in response formats.
43+
- JSON mode is older and has been used by developers since early API implementations, but lacks reliability in response formats.
4444

4545
<Message type="note">
46-
- All LLMs on the Scaleway library support **Structured outputs** and **JSON mode**. However, a schemaless **JSON mode** will produce lower quality results and is not recommended.
46+
- All LLMs in the Scaleway library support **Structured outputs** and **JSON mode**. However, a schemaless **JSON mode** will produce lower quality results and is not recommended.
4747
</Message>
4848

4949
## Code examples
@@ -193,8 +193,8 @@ Output example:
193193
### Using JSON mode (schemaless, Legacy method)
194194

195195
<Message type="important">
196-
- When using the OpenAI SDKs like in the examples above, you are expected to set `additionalProperties` to false, and to specify all your properties as required.
197-
- JSON mode: It is important to explicitly ask the model to generate a JSON output either in system prompt or user prompt. To prevent infinite generations, model providers most often encourage users to ask the model for short JSON objects. Prompt example: `Only answer in JSON using '{' as the first character.`.
196+
- When using the OpenAI SDKs as in the examples above, you are expected to set `additionalProperties` to false, and to specify all your properties as required.
197+
- JSON mode: It is important to explicitly ask the model to generate a JSON output either in the system prompt or user prompt. To prevent infinite generations, model providers most often encourage users to ask the model for short JSON objects. Prompt example: `Only answer in JSON using '{' as the first character.`.
198198
</Message>
199199

200200
In JSON mode, you can prompt the model to output a JSON object without enforcing a strict schema.

0 commit comments

Comments
 (0)