aisdk / typesafe
Native TypeSafe Jev decisions for the framework-agnostic PHP AI SDK.
Fund package maintenance!
v0.11.0
2026-10-31 02:59 UTC
Requires
- php: ^8.3
- aisdk/core: ^0.11.0
Requires (Dev)
- laravel/pint: ^1.18
- nyholm/psr7: ^1.8
- pestphp/pest: ^3.0 || ^4.0
- phpstan/phpstan: ^2.0
- rector/rector: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Make structured decisions with TypeSafe Jev through the framework-agnostic PHP AI SDK. Get typed answers with provider-reported probabilities and confidence.
Installation
composer require aisdk/typesafe
Set TYPESAFE_API_KEY in your environment.
Usage
use AiSdk\Decisions\Question; use AiSdk\Generate; use AiSdk\TypeSafe; $result = Generate::decision(['ticket' => 'I was charged twice. Please help.']) ->model(TypeSafe::model('jev-latest')) ->questions(Question::predicate('urgent', 'Does this need immediate attention?')) ->run(); $urgent = $result->answer('urgent')->yes(0.9);
Documentation
Read the documentation for configuration, supported features, and more examples.
License
The MIT License (MIT). See LICENSE for details.