prism  by prism-php

Laravel package for LLM integration

created 1 year ago
1,756 stars

Top 25.0% on sourcepulse

GitHubView on GitHub
Project Summary

Prism is a Laravel package designed to simplify the integration of Large Language Models (LLMs) into PHP applications. It offers a fluent API for text generation, conversational AI, and tool usage across multiple AI providers, enabling developers to build AI-powered features without deep LLM infrastructure knowledge.

How It Works

Prism abstracts the complexities of interacting with different LLM APIs through a unified, expressive interface. It handles request formatting, response parsing, and state management for conversational flows, allowing developers to chain operations and define AI interactions in a readable, object-oriented manner.

Quick Start & Requirements

  • Install via Composer: composer require prism-php/prism
  • Requires PHP 8.1+ and Laravel 9+.
  • Official Documentation: https://prism.appz.dev/

Highlighted Details

  • Unified interface for multiple LLM providers (e.g., OpenAI, Anthropic).
  • Fluent API for text generation and multi-turn conversations.
  • Support for LLM tools and function calling.
  • Built specifically for the Laravel ecosystem.

Maintenance & Community

  • Created by TJ Miller with community contributions.
  • Follows the Laravel Code of Conduct.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial and closed-source applications.

Limitations & Caveats

The package is primarily focused on the Laravel framework and may require significant adaptation for use outside of this ecosystem.

Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
50
Issues (30d)
32
Star History
450 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.