cognesy/instructor-polyglot

Unified LLM connectivity layer for PHP applications

Maintainers

Package info

github.com/cognesy/instructor-polyglot

pkg:composer/cognesy/instructor-polyglot

Statistics

Installs: 405

Dependents: 6

Suggesters: 1

Stars: 0

Open Issues: 0


README

Unified LLM connectivity layer for InstructorPHP.

It provides two facades:

  • Inference for chat/completion responses
  • Embeddings for vector generation

Example

<?php

use Cognesy\Polyglot\Inference\Inference;

$text = Inference::using('openai')
    ->withModel('gpt-4o-mini')
    ->withMessages('Write one short sentence about PHP.')
    ->get();

Documentation

  • packages/polyglot/docs/quickstart.md
  • packages/polyglot/docs/essentials/inference-class.md
  • packages/polyglot/docs/embeddings/overview.md
  • packages/polyglot/docs/_meta.yaml