Skip to content

Commit 049dac6

Browse files
committed
Refactored code to improve readability and maintainability.
1 parent 5caedea commit 049dac6

File tree

6 files changed

+27
-694
lines changed

6 files changed

+27
-694
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,11 @@ Set your [Groq API key](https://console.groq.com/keys) on the `.env` file:
1919
GROQ_API_KEY=gsk_...
2020
```
2121

22-
If you need, you can set an alternative proxy base URL:
23-
```
24-
GROQ_API_BASE_URL=https://api.groq.com/openai/v1 # can be overitten by request
25-
```
26-
2722
## Usage
2823

2924
### Groq Facade
3025

31-
You can use the `Groq` facade to interact with the Groq package:
26+
You can use the `Groq` facade to interact with the Groq API like this:
3227

3328
```php
3429
use Illuminate\Support\Facades\Route;
@@ -38,7 +33,7 @@ Route::get('/', function () {
3833
$groq = new Groq();
3934

4035
$chatCompletion = $groq->chat()->completions()->create([
41-
'model' => 'llama2-70b-4096', // llama2-70b-4096, mixtral-8x7b-32768, gemma-7b-it
36+
'model' => 'llama3-8b-8192', // llama3-8b-8192, llama3-70b-8192, llama2-70b-4096, mixtral-8x7b-32768, gemma-7b-it
4237
'messages' => [
4338
[
4439
'role' => 'user',
@@ -51,7 +46,10 @@ Route::get('/', function () {
5146
});
5247
```
5348

49+
*Groq Laravel Package* is just a wrapper to the [Grok PHP library](https://github.com/lucianotonet/groq-php), so you can use all the methods and classes from that library through the facade.
50+
51+
All examples found on the [examples directory](https://github.com/lucianotonet/groq-php/tree/main/examples) can be used with the Groq facade.
52+
5453
## License
5554

5655
This package is open-sourced software licensed under the MIT license. See the [LICENSE](LICENSE) file for more information.
57-

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "lucianotonet/groq-laravel",
33
"description": "Unofficial Laravel package for the Groq API",
44
"type": "library",
5-
"version": "0.0.3",
5+
"version": "0.0.4",
66
"license": "MIT",
77
"authors": [
88
{
@@ -12,7 +12,7 @@
1212
],
1313
"require": {
1414
"php": ">=8.1",
15-
"lucianotonet/groq-php": "^0.0.3"
15+
"lucianotonet/groq-php": "^0.0.4"
1616
},
1717
"autoload": {
1818
"psr-4": {

0 commit comments

Comments
 (0)