Download the PHP package arturas88/anyllm without Composer

On this page you can find all versions of the php package arturas88/anyllm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package anyllm

AnyLLM PHP - Universal LLM Library

One interface, all providers. Zero vendor lock-in.

Features • Installation • Quick Start • Documentation • Examples


🎉 Production-Ready Enterprise-Grade LLM Library

A comprehensive, battle-tested PHP 8.2+ library providing a unified interface for interacting with multiple LLM providers. Built for production with persistence, logging, rate limiting, caching, metrics, middleware, and more.

Latest: All Priority 2 features complete! Embeddings, Middleware, Advanced Streaming, Metrics & Monitoring. ✅

✨ Features

🔥 Core Capabilities

🚀 Production-Ready Infrastructure

🎯 Developer Experience

📦 Installation

Prerequisites

Step 1: Install Dependencies

Step 2: Configure API Key

Get your API key: https://platform.openai.com/api-keys

Then set it up:

Important: Make sure to use your actual API key, not the placeholder!

Step 3: Test It Works

You should see:

Run Your First Example

Expected output:

🚀 Quick Start

1. Basic Chat

2. Conversation with History

3. With Retry & Caching

4. Structured Output

5. Tool Calling

6. Agents & Workflows

Agents - Autonomous Problem Solving

Human-in-the-Loop Agents

Workflows - Multi-Step Orchestration

Workflows with Structured Output

Human-in-the-Loop Workflows

7. Production Features

Persistence

Logging

Rate Limiting

Caching

6. Embeddings & Semantic Search

Middleware Pipeline

Streaming with Controls

Metrics Dashboard

🎯 Supported Providers

Provider Chat Streaming Tools Embeddings Images Audio Vision Local
OpenAI ✅ DALL-E ✅ Whisper
Anthropic ✅ Claude
Google ✅ Gemini
Mistral ✅ Pixtral
xAI (Grok)
OpenRouter Varies Varies Varies Varies Varies
Ollama Varies Varies Varies

📚 Documentation

💡 Examples

Comprehensive examples for every feature:

🛠️ Quick Commands

🏗️ Architecture

⚡ Performance

With Caching (Redis)

With Conversation Summarization

With Rate Limiting

🔧 Configuration

Create config/any-llm.php:

🗄️ Database Setup

SQLite (Recommended for Local Development)

Perfect for local development - no server setup required:

MySQL/PostgreSQL (Production)

Supported Databases:

🎯 Best Practices

1. Always Use Retry Logic

2. Cache Expensive Calls

3. Monitor Usage

4. Set Rate Limits

5. Use Conversations for Chat

🧪 Testing

🔧 Common Issues & Troubleshooting

Issue 1: "OPENAI_API_KEY not set"

Solution: Make sure you created the .env file with your API key:

Issue 2: "cURL error 77: certificate file"

This happens with some local PHP environments (like Laravel Herd).

Solution: Set the certificate path or disable SSL verification (development only):

Issue 3: "Class not found"

Solution: Regenerate the autoloader:

Issue 4: Example returns empty response

Possible causes:

Debug:

API Key Issues

Rate Limits

Token Issues

Debugging

Debug HTTP requests and responses to see exactly what's being sent to and received from LLM providers:

The debug output shows:

Base64-encoded content (images, PDFs, etc.) is automatically truncated in logs for readability, but you can show full content with showFullBase64: true.

🚢 Production Checklist

📊 Benchmarks

🤝 Contributing

Contributions welcome! The library is designed for easy extension:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new features
  4. Submit a pull request

📝 License

MIT License - see LICENSE file for details.

🙏 Credits

Built with ❤️ using PHP 8.2+, Guzzle, and modern PHP best practices.


Ready for production use!
Start building amazing LLM-powered applications today.

Get Started • View Examples • Changelog


All versions of anyllm with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0|^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package arturas88/anyllm contains the following files

Loading the files please wait ...