Download the PHP package papi-ai/effect without Composer
On this page you can find all versions of the php package papi-ai/effect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download papi-ai/effect
More information about papi-ai/effect
Files in papi-ai/effect
Package effect
Short Description Effect/fiber async bridge for PapiAI, built on phunkie/effect and phunkie/streams
License MIT
Informations about the package effect
papi-ai/effect
Effect/fiber async bridge for PapiAI, built on
phunkie/effect and
phunkie/streams.
Long-running capabilities such as video generation (Google Veo, OpenAI Sora) can take minutes.
This package lets you describe those jobs as pure IO effects, fork them into background fibers,
and await the result later — without Symfony Messenger or any external queue.
Install
Requires papi-ai/papi-core ^0.10 and a video-capable provider (e.g. papi-ai/google or
papi-ai/openai).
Usage
Compose the effects with map() / flatMap(), or run them synchronously with unsafeRun().
Progress as a stream
API
EffectVideo wraps any VideoProviderInterface:
| Method | Returns | Notes |
|---|---|---|
generateVideoIO($prompt, $options) |
IO<VideoResponse> |
blocking generation as a lazy effect |
startVideoIO($prompt, $options) |
IO<string> |
submit, produce a job id |
videoStatusIO($jobId) |
IO<JobStatus> |
poll status |
fetchVideoIO($jobId) |
IO<VideoResponse> |
fetch a completed job |
generateVideoAsync($prompt, $options, $context?) |
AsyncHandle<VideoResponse> |
fork into a fiber; await() later |
progressStream($jobId, $maxPolls = 60) |
Stream<JobStatus> |
observed statuses until terminal |
License
MIT © Marcello Duarte
All versions of effect with dependencies
papi-ai/papi-core Version ^0.15
phunkie/effect Version ^1.2
phunkie/streams Version ^1.1