Skip to main content
Back to packages
2,377 GitHub stars

echolabsdev/prism

View on GitHub

Description

Package for integrating Large Language Models (LLMs) into your AI applications.

Here's a quick example of how you can generate text using Prism:

use Prism\Prism\Facades\Prism;
use Prism\Prism\Enums\Provider;
 
$response = Prism::text()
->using(Provider::Anthropic, 'claude-3-7-sonnet-latest')
->withSystemPrompt(view('prompts.system'))
->withPrompt('Explain quantum computing to a 5-year-old.')
->asText();
 
echo $response->text;

Related Content on Laravel Daily

Video
Video

Recent Courses on Laravel Daily

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.