You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: bump version to 1.0.0 and update Groq-PHP dependency
- Update version in composer.json to 1.0.0
- Ensure default value for api_base in ConfigTest
- Add assertions to verify api_base and baseUrl configurations
Copy file name to clipboardExpand all lines: README.md
+196Lines changed: 196 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,202 @@ The Groq Laravel package also provides access to the Groq Vision API, allowing y
125
125
- The Vision API requires a model compatible with image analysis, such as `llava-v1.5-7b-4096-preview`. You can configure the default model for Vision in the `config/groq.php` configuration file.
126
126
- The Vision API is an experimental feature and may not meet expectations, as well as not having long-term support.
127
127
128
+
## Audio Transcriptions
129
+
130
+
The Groq Laravel package allows you to transcribe audio using advanced models like Whisper.
echo $result['text']; // English text translated from the audio
182
+
```
183
+
184
+
**Example with advanced options:**
185
+
186
+
```php
187
+
// Translation with advanced options
188
+
$result = Groq::translations()->create([
189
+
'file' => storage_path('app/audio/french.mp3'),
190
+
'model' => 'whisper-large-v3',
191
+
'prompt' => 'This is a business meeting', // Context in English
192
+
'temperature' => 0.3, // Lower randomness for more accuracy
193
+
'response_format' => 'verbose_json' // Detailed format with timestamps
194
+
]);
195
+
196
+
// Now you have access to timestamps and segments in English
197
+
echo $result['text']; // Complete text in English
198
+
foreach ($result['segments'] as $segment) {
199
+
echo "From {$segment['start']} to {$segment['end']}: {$segment['text']}\n";
200
+
}
201
+
```
202
+
203
+
## Step-by-Step Reasoning
204
+
205
+
Groq Laravel offers support for obtaining responses with step-by-step reasoning, useful for detailed explanations, mathematical problems, or any solution that benefits from a transparent process.
206
+
207
+
**Example with raw reasoning format:**
208
+
209
+
```php
210
+
use LucianoTonet\GroqLaravel\Facades\Groq;
211
+
212
+
// Raw format - displays the entire reasoning process
0 commit comments