hameleon2x/llm-orchestra 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hameleon2x/llm-orchestra

Composer 安装命令:

composer require hameleon2x/llm-orchestra

包简介

PHP LLM client with provider fallback (OpenAI, OpenRouter, Requesty), agent loop with tool calling, typed tool results and PSR-3 logging. Framework-agnostic, no SDK dependencies. PHP 7.4+.

README 文档

README

en ru

llm-orchestra

PHP LLM client with provider fallback (OpenAI, OpenRouter, Requesty), an agent loop with tool calling and typed tool results, and PSR-3 logging. Framework-agnostic, no SDK dependencies — uses ext-curl directly.

Install

composer require hameleon2x/llm-orchestra

Minimal example

<?php
require __DIR__ . '/vendor/autoload.php';

use Hameleon2x\Llm\Client;
use Hameleon2x\Llm\Dto\Request;
use Hameleon2x\Llm\Provider\OpenAiProvider;

$client = new Client();
$client->providers = [
    ['class' => OpenAiProvider::class, 'token' => 'sk-...', 'model' => 'gpt-4o-mini'],
];

$response = $client->execute(Request::simple('You are a helpful assistant', 'What is PHP?'));
if ($response->isSuccess()) {
    echo $response->content;
}

Documentation

I want to... Read
Send my first request docs/01-getting-started.md
Configure providers and fallback order docs/02-providers-and-fallback.md
Plug in PSR-3 logging (Monolog, Yii2, etc.) docs/03-logging.md
Write my own tool (function calling) docs/04-tools.md
Run an agent loop (tools + multi-turn) docs/05-toolbox-and-runner.md
Stream events from the agent loop (UI progress, DB logging) docs/06-events.md
Pause for user input and resume (human-in-the-loop) docs/13-human-in-the-loop.md
See the full doc index docs/README.md

Requirements

  • PHP 7.4+
  • ext-curl, ext-json
  • psr/log ^1.1 || ^2.0 || ^3.0

Versioning

License

MIT — see LICENSE.

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固