LLPhant
LLPhant copied to clipboard
Integration with GroqCloud
Integration with GroqCloud
https://groq.com/
It makes several models available quickly, has a limited but very efficient free service.
Hey @Gudetomi . It is a very good idea. Do you want to try to make a PR to implement it?
If yes, you need to create a class that implement ChatInterface.php but you don't need to implement everything. At least generateText. You can see example for other providers in the code.
Great idea! However, using Groq is already quite simple:
You can leverage the OpenAPI provider with a different base URL and model.
All you need really is:
$config = new OpenAIConfig();
$config->model = 'llama-3.1-8b-instant'; // Or some other model from the Groq Docs
$config->apiKey = '...'; // your GroqCloud API key
$config->url = 'https://api.groq.com/openai/v1';
$chat = new OpenAIChat($config);
$chat->setSystemMessage('You are funny and you know it.');
$response = $chat->generateText('Tell me a simple joke!');