Skip to content

Commit

Permalink
Formatting for structured outputs guide (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkozakov authored Sep 27, 2024
1 parent f58de18 commit 38bda3e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions fern/pages/v2/text-generation/structured-outputs-json.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ By setting the `response_format` type to `"json_object"` in the Chat API, the ou
```


> 📘 Important
>
> When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
<Info title="Important">
When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length.
</Info>

## Specifying a schema (beta)

Expand Down Expand Up @@ -99,9 +98,9 @@ In this schema, we defined three keys ("title," "author," "publication_year") an
```

> 📘 Important
>
> Specifying a `schema` adds even more latency, proportional to the complexity of the schema. This parameter is in **beta**, and will continue seeing performance improvements.
<Info title="Important">
Specifying a `json_schema` adds even more latency, proportional to the complexity of the schema. This parameter is in **beta**, and will continue seeing performance improvements.
</Info>

### Generating nested objects

Expand Down

0 comments on commit 38bda3e

Please sign in to comment.