TypeScript has Vercel AI SDK, Python has LangChain, and PHP has Lenorix AI SDK.
We are crafting open-source software for everyone, releasing it under the Unlicense to let it in the public domain. If you find our work useful, consider supporting us.
Service | Chat | Streaming | Tools | Vision | Caching | Structured Output | MCP Client | |
---|---|---|---|---|---|---|---|---|
OpenAI | ✓ | ✕ | ✓ | ✕ | ✕ | ✕ | ✕ | ✕ |
DeepSeek | ✓ | ✕ | ✓ | ✕ | ✕ | ✕ | ✕ | ✕ |
Anthropic | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
Groq | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
Mistral | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
xAI | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
You can install the package via composer:
composer require lenorix/ai
use Lenorix\Ai\Provider\DeepSeek;
use Lenorix\Ai\AiText;
use Lenorix\Ai\Chat\ToolFromLambda;
AiText::generate(
provider: new DeepSeek('deepseek-chat', 'sk-********************************'),
tools: [
// This is only an example, you can create your tool extending from CoreTool base class.
new ToolFromLambda(
fn ($city = 'madrid') => $city . ' is sunny',
'weather',
'get weather updated'
),
],
system: 'help users to know the weather with updated information',
prompt: 'tell me the weather',
messages: [
['role' => 'user', 'content' => 'hello'],
['role' => 'assistant', 'content' => 'hi!']
],
maxSteps: 50
);
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.