zzhenping/runpod-client
最新稳定版本:v2
Composer 安装命令:
composer require zzhenping/runpod-client
包简介
A Hyperf component that provides a convenient client for interacting with the RunPod API. This package simplifies serverless GPU workload management, allowing easy deployment and execution of AI/ML tasks on RunPod's cloud infrastructure.
README 文档
README
这是一个用于调用 RunPod API 的 Hyperf 组件,支持常用 Serverless 接口,如异步作业提交、状态查询、取消任务等。
✨ 功能特性
run:异步提交作业并返回作业 IDrunsync:同步执行作业并直接返回结果status:查询作业状态及输出stream:读取流式增量结果cancel:取消进行中的作业retry:重试失败或超时的作业purge-queue:清空队列中的作业health:检查运行状态
📦 安装
composer require zzhenping/runpod-client
🔧 快速生成配置文件
php bin/hyperf.php vendor:publish zzhenping/runpod-client
🧩 使用示例
use Zzhenping\RunPodClient\Serverless\ServerlessService;
class IndexController extends AbstractController
{
public function __construct(protected ServerlessService $runpod){}
public function index()
{
return [
'health' => $this->runpod->health('bcb5un8ejvlce7'),
'new_health' => $this->runpod->withPool('new_run_pod')->health('m9d0vbz7fzbjum'), // 新的连接
];
}
}
统计信息
- 总下载量: 86
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-12