cognesy/instructor-config 问题修复 & 功能扩展

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

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

cognesy/instructor-config

最新稳定版本:v2.3.1

Composer 安装命令:

composer require cognesy/instructor-config

包简介

Lean config loading utilities for Instructor

README 文档

README

Minimal configuration infrastructure for Instructor.

Scope:

  • load YAML or PHP config files as raw arrays,
  • resolve relative config file names against multiple base paths,
  • derive deterministic dot-keys from file paths,
  • optional YAML/PHP parse cache compiled to PHP,
  • parse DSN strings into raw arrays,
  • no presets, no provider chains, no global settings.

Usage:

use Cognesy\Config\Config;
use Cognesy\Config\ConfigLoader;

$single = Config::fromPaths(
    __DIR__ . '/packages/polyglot/resources/config',
    __DIR__ . '/packages/http-client/resources/config',
)->load('llm/presets/openai.yaml')->toArray();

$configs = ConfigLoader::fromPaths(
    __DIR__ . '/packages/polyglot/resources/config',
    __DIR__ . '/packages/http-client/resources/config',
)->withCache(__DIR__ . '/var/cache/instructor-config.php');

$one = $configs->load('llm/presets/openai.yaml')->toArray();
$many = $configs->loadAll(
    'llm/presets/openai.yaml',
    'http/profiles/curl.yaml',
);

DSN parsing:

use Cognesy\Config\Dsn;

$raw = Dsn::fromString('driver=openai,metadata.region=us-east-1')->toArray();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固