Skip to content

Commit cd4426f

Browse files
committed
readme for structured output is updated
1 parent b236852 commit cd4426f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,12 @@ $content = Arr::get($response->choices[0], 'message.content');
392392
```
393393

394394
- #### Structured Output
395+
(Please also refer to [OpenRouter Document Structured Output](https://openrouter.ai/docs/structured-outputs) for models supporting structured output, also more details)
396+
395397
If you want to receive the response in a structured format, you can specify the `type` property for `response_format` (ResponseFormatData) as `json_object` in the `ChatData` object.
398+
396399
Additionally, it's recommended to set the `require_parameters` property for `provider` (ProviderPreferencesData) to `true` in the `ChatData` object.
397400

398-
(Please also refer to [OpenRouter Document Structured Output](https://openrouter.ai/docs/structured-outputs) for models supporting structured output, also more details)
399401
```php
400402
$chatData = new ChatData([
401403
'messages' => [

0 commit comments

Comments
 (0)