Search by

aisdk / typesafe

aisdk

Native TypeSafe Jev decisions for the framework-agnostic PHP AI SDK.

Package info

github.com/phpaisdk/typesafe

pkg:composer/aisdk/typesafe

Fund package maintenance!

Open Collective

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.11.0 2026-10-31 02:59 UTC

This package is auto-updated.

Last update: 2026-11-03 18:58:43 UTC


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.

Contributing ยท Support

License

The MIT License (MIT). See LICENSE for details.