first commit

This commit is contained in:
2025-09-07 08:50:01 +03:30
commit 3db69ed1c5
132 changed files with 12708 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Modules\Groq;
use Illuminate\Support\Facades\Http;
class GroqApi
{
public static function chat($messages)
{
$token = config('services.groq.key');
return Http::withHeaders([
'authorization' => 'Bearer ' . $token,
])->post('https://api.groq.com/openai/v1/chat/completions', [
'model' => 'llama-3.3-70b-versatile',
'messages' => $messages,
'temperature' => 0.2,
'max_tokens' => 4096,
'top_p' => 1,
'stream' => false
]);
}
}