promptjuggler/sdk
Composer 安装命令:
composer require promptjuggler/sdk
包简介
PHP SDK for the PromptJuggler API
README 文档
README
A typed PHP client for the PromptJuggler API — run prompts and workflows, manage knowledge bases, and verify webhooks.
Generated with Kiota and fronted by a hand-written facade. Do not edit
src/— it is regenerated from the OpenAPI spec. The public API lives inlib/.
Requirements
- PHP 8.2+
Installation
composer require promptjuggler/sdk
Usage
use PromptJuggler\Client\PromptJuggler; use PromptJuggler\Client\Models\RunStatus; $pj = new PromptJuggler('your-api-key'); // Trigger a run (async — returns the run ID) $created = $pj->runPrompt('greeting', 'production', inputs: ['name' => 'Ada']); // Poll for the result $run = $pj->getPromptRun($created->getId()); if ($run->getStatus()?->is(RunStatus::COMPLETED)) { echo $run->getOutput(); }
Errors surface as PromptJuggler\Client\Exception\ApiException (with a statusCode).
Verify incoming webhooks with PromptJuggler\Client\Webhook\WebhookSignature::isValid().
Documentation
Full guides and the API reference: https://docs.promptjuggler.com/sdks/php/overview
License
MIT
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-24