Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting for structured outputs guide #166

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading