Open
Description
First, thank you for developing this library. I am wondering if this package supports Grok's Structured Outputs feature.
For instance, when using openai-php/laravel
, I can utilize the Structured Outputs feature as follows:
$jsonSchema = [
'name' => 'scores',
'schema' => [
'type' => 'object',
'properties' => [
'score1' => ['type' => 'number'],
'score2' => ['type' => 'number'],
],
'required' => ['score1', 'score2'],
'additionalProperties' => false,
],
'strict' => true,
];
$response = OpenAI::chat()->create([
'model' => 'gpt-4o-mini',
'messages' => [
['role' => 'system', 'content' => $prompt],
],
'response_format' => [
'type' => 'json_schema',
'json_schema' => $jsonSchema,
],
]);
If this package supports Structured Outputs, could you please provide guidance on how to implement it? If not, are there alternative methods to achieve similar functionality? Thank you!
Related Links:
Metadata
Metadata
Assignees
Labels
No labels