GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cognesy/instructor-struct: [READ-ONLY] Structured outputs from LLMs

BranchesTags
Open more actions menu

Latest commit

 

History

236 Commits
236 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
resources
resources
 
 
src
src
 
 
tests
tests
 
 
.env-dist
.env-dist
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CHEATSHEET.md
CHEATSHEET.md
 
 
LICENSE
LICENSE
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
phpstan.neon
phpstan.neon
 
 
phpunit.xml
phpunit.xml
 
 
psalm.xml
psalm.xml
 
 

Repository files navigation

Instructor Package

Core structured-output engine for InstructorPHP.

Use it to turn unstructured LLM responses into typed PHP data, with validation, retries, and streaming updates.

Example

<?php

use Cognesy\Instructor\StructuredOutput;
use Cognesy\Polyglot\Inference\Config\LLMConfig;

class Person {
    public string $name;
    public int $age;
}

$person = StructuredOutput::fromConfig(LLMConfig::fromArray(['driver' => 'openai']))
    ->with(
        messages: 'His name is Jason and he is 28 years old.',
        responseModel: Person::class,
    )
    ->get();

Documentation

  • packages/instructor/docs/quickstart.md
  • packages/instructor/docs/essentials/usage.md
  • packages/instructor/docs/_meta.yaml

About

[READ-ONLY] Structured outputs from LLMs

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.