1tomany/llm-sdk
Laravel-friendly PHP SDK for working with LLM providers. Provides a clean client API, request/response handling, and configurable drivers so you can send prompts, manage completions, and integrate AI features into your app with minimal boilerplate.
Strengths:
Gaps:
Laravel Compatibility:
.env.LlmQueryCompiled, LlmResponseReceived).HandleLlmRequests).Migration Path:
1tomany/llm-sdk in a single feature (e.g., chatbot), then expand.High:
Medium:
Low:
Provider Strategy:
Performance SLAs:
Cost vs. Control:
Maintenance:
Compliance:
Scaling:
Laravel Ecosystem:
ClientFactory as a Laravel singleton or contextual binding for dynamic provider selection.config/llm.php) to define:
'providers' => [
'openai' => [
'key' => env('OPENAI_KEY'),
'model' => 'gpt-4',
],
'gemini' => [
'key' => env('GEMINI_KEY'),
'model' => 'gemini-1.5-pro',
],
],
.env for API keys, timeouts, and fallback providers.Testing:
ClientFactory./api/chat).Observability:
Phase 1: Proof of Concept (1–2 weeks)
Phase 2: Core Integration (2–4 weeks)
.env variables, config files).ChatService, EmbeddingService).Phase 3: Full Adoption (4–8 weeks)
Phase 4: Optimization (Ongoing)
LlmResponseGenerated).guzzlehttp/guzzle) must align with Laravel’s versions.How can I help you explore Laravel packages today?