arkitecht/laravel-hume
最新稳定版本:1.9
Composer 安装命令:
composer require arkitecht/laravel-hume
包简介
Laravel API wrapper for the Hume API
README 文档
README
Laravel Hume is a PHP package that provides a Laravel wrapper for the Hume AI API, enabling seamless integration of Hume's empathic AI capabilities into Laravel applications.
Features
- Empathic Voice Interface (EVI): A completely native PHP wrapper around the EVI REST API
Installation
To install the Laravel Hume package, run the following command in your terminal:
composer require arkitecht/laravel-hume
After installation, publish the configuration file using:
php artisan vendor:publish --provider="Arkitecht\LaravelHume\HumeServiceProvider"
Configuration
Add your environment variables to your .env file
HUME_API_KEY=your-api-key-here HUME_API_SECRET=your-api-key-here
If you prefer the API to request and use an auth token, rather than the key and secret, add the following
HUME_API_AUTH=token
Usage
The library provides a Facade for making calls easily
<?php use Arkitecht\LaravelHume\Facades\Hume; $chats = Hume::listChats(); $chat = $chats->first(); print "The first chat is: " . $chat->getId() . ' with a status of ' . $chat->getStatus();
<?php use Arkitecht\LaravelHume\Facades\Hume; use Arkitecht\LaravelHume\Classes\Prompt; $prompt = new Prompt(); $prompt->setName('Cool New Prompt') ->setText('<role>You are a helpful bot</role>'); Hume::createPrompt($prompt);
Or use the base API Class
<?php use Arkitecht\LaravelHume\Hume; $humeService = new Hume('api_key','api_secret'); $chats = $humeService->usingAccessToken()->listChats(); $chat = $chats->first(); print "The first chat is: " . $chat->getId() . ' with a status of ' . $chat->getStatus();
<?php use Arkitecht\LaravelHume\Hume; use Arkitecht\LaravelHume\Classes\Prompt; $humeService = new Hume('api_key','api_secret'); $prompt = new Prompt(); $prompt->setName('Cool New Prompt') ->setText('<role>You are a helpful bot</role>'); $humeService->createPrompt($prompt);
统计信息
- 总下载量: 82
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-06