prism  by prism-php

Laravel package for LLM integration

Created 2 years ago
2,375 stars

Top 18.8% 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

2 months ago

Responsiveness

1 day

Pull Requests (30d)
3
Issues (30d)
1
Star History
27 stars in the last 30 days

Explore Similar Projects

Starred by Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), and
9 more.

Qwen-Agent by QwenLM

0.3%
16k
Agent framework for LLM application development
Created 2 years ago
Updated 2 months ago
Feedback? Help us improve.