Skip to content

Commit 59993d5

Browse files
committed
Add basic stuff
1 parent 9bdbe75 commit 59993d5

File tree

6 files changed

+31
-22
lines changed

6 files changed

+31
-22
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "lucianotonet/groq-laravel",
33
"description": "Unofficial Laravel package for the Groq API",
44
"type": "library",
5+
"version": "0.0.2",
56
"license": "MIT",
67
"authors": [
78
{
@@ -11,8 +12,8 @@
1112
],
1213
"require": {
1314
"php": ">=8.1",
14-
"lucianotonet/groq-php": "^0.0.1"
15-
},
15+
"lucianotonet/groq-php": "^0.0.2"
16+
},
1617
"autoload": {
1718
"psr-4": {
1819
"LucianoTonet\\GroqLaravel\\": "src/"

composer.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Facades/Groq.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
namespace LucianoTonet\GroqLaravel\Facades;
44

55
use Illuminate\Support\Facades\Facade;
6+
use LucianoTonet\GroqLaravel\GroqLaravel;
67

78
class Groq extends Facade
89
{
910
protected static function getFacadeAccessor()
1011
{
11-
return 'GroqLaravel';
12+
return GroqLaravel::class;
1213
}
13-
}
1414

15+
public static function chat()
16+
{
17+
return static::getFacadeRoot()->chat();
18+
}
19+
}

src/Groq.php

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/GroqLaravel.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace LucianoTonet\GroqLaravel;
4+
use LucianoTonet\GroqPHP\Chat;
5+
6+
class GroqLaravel extends \LucianoTonet\GroqPHP\Groq
7+
{
8+
public function chat(): Chat
9+
{
10+
return new Chat($this);
11+
}
12+
}

src/GroqServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class GroqServiceProvider extends ServiceProvider
99
public function register()
1010
{
1111
$this->app->bind('GroqLaravel', function () {
12-
return new Groq();
12+
return new GroqLaravel();
1313
});
1414
}
1515

0 commit comments

Comments
 (0)