labsllm / llm-wrapper
Biblioteca PHP que integra diferentes serviços de LLM (ChatGPT, Claude, Gemini) em um wrapper único
v1.0.1
2025-05-03 23:53 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^9.5
README
A simple PHP library that provides a unified interface for interacting with various Large Language Models like OpenAI, Anthropic, and Google.
Install
composer require labsllm/llm-wrapper
Basic Usage
Sending a simple prompt to an LLM:
// With prompt only $response = LabsLLM::text() ->using(new OpenAI($apiKey, 'gpt-4o-mini')) ->withPrompt('Your question here') ->asText();
With System Instructions
You can include system instructions in your prompt:
// With system instructions $response = LabsLLM::text() ->using(new OpenAI($apiKey, 'gpt-4o-mini')) ->withPrompt('System: Act as a historian\nUser: Tell me about knights') ->asText();
Provider Support Status
Legend:
- ✅ Supported
- 🚧 In Development
- 📅 Planned
- ❌ Not Supported
Feature | OpenAI | Anthropic | |
---|---|---|---|
Text Prompts | ✅ | 🚧 | 📅 |
System Instructions | ✅ | 🚧 | 📅 |
Tools/Functions | 🚧 | 📅 | ❌ |
Embeddings | 📅 | ❌ | ❌ |
Voice | 📅 | ❌ | ❌ |
Image Generation | 📅 | ❌ | 📅 |