Skip to content

Commit b87820d

Browse files
authored
Update README.md
1 parent 5fe069e commit b87820d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ composer require alvincoded/grok-php-client
4141

4242
## Quick Start
4343

44-
__Here's how simple it is to use Grok PHP :__
45-
<br>
44+
> **Here's how simple it is to use Grok PHP :**
4645
4746
#### _Chat Completion_
4847

@@ -181,13 +180,15 @@ echo $config->modelSupportsFunctions($model) // false
181180
```
182181

183182
#### _Structured Output_
184-
185183
```php
186184
<?php
187185

188186
use GrokPHP\Client\GrokClient;
189187
use GrokPHP\Enums\Model;
190188

189+
// Scenario example: A university library needs to process 50,000 research papers into their new digital repository.
190+
// Each entry requires consistent metadata fields.
191+
191192
// 1. Define schema once
192193
$jsonSchema = [
193194
"type" => "object",
@@ -232,8 +233,8 @@ class ResearchPaper extends \GrokPHP\Utils\DataModel
232233
#[SchemaProperty(type: 'array', description: 'List of authors')]
233234
public array $authors;
234235

235-
#[SchemaProperty(type: 'string', description: 'Abstract text')]
236-
public string $abstract;
236+
#[SchemaProperty(type: 'integer', description: 'Year of publication', required: false)]
237+
public int $publicationYear;
237238
}
238239

239240
// ...then, in your application code
@@ -322,6 +323,7 @@ try {
322323
<br>
323324

324325
## Environment Variables
326+
Add the following to your `.env` file:
325327
```
326328
GROK_API_KEY=your-api-key
327329
```
@@ -356,4 +358,4 @@ If you encounter any issues or have questions, please [open an issue](https://gi
356358
---
357359
</br>
358360

359-
<p align='center'>Built with ❤️ for the AI community.</p>
361+
<p align='center'>Built with ❤️ for the AI community.</p>

0 commit comments

Comments
 (0)