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

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

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

cognesy/instructor-laravel

Composer 安装命令:

composer require cognesy/instructor-laravel

包简介

Laravel integration for Instructor PHP - Structured LLM outputs made simple

README 文档

README

Laravel integration for InstructorPHP.

It provides:

  • Laravel service provider and config
  • Facades for StructuredOutput, Inference, Embeddings, and AgentCtrl
  • Laravel-specific HTTP client and HTTP pool drivers
  • a Laravel-bound CanSendHttpRequests transport implementation
  • native Cognesy\Agents container bindings, registry loading, and session runtime
  • database-backed native agent sessions, broadcasting helpers, telemetry wiring, and logging presets
  • testing fakes for facade-based tests and Laravel-native helper utilities for native agents
  • Artisan commands for install, smoke-test, and response-model scaffolding

The package now treats native Cognesy\\Agents runtime configuration and AgentCtrl code-agent execution as separate Laravel surfaces:

  • agents is reserved for native agent runtime integration
  • agent_ctrl configures CLI code agents exposed through the AgentCtrl facade
  • telemetry is the first-class config namespace for Laravel telemetry wiring

Example

<?php

use App\ResponseModels\PersonData;
use Cognesy\Instructor\Laravel\Facades\StructuredOutput;

$person = StructuredOutput::with(
    messages: 'John Smith is 30 years old',
    responseModel: PersonData::class,
)->get();

Documentation

  • packages/laravel/docs/index.md
  • packages/laravel/CHEATSHEET.md

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固