Skip to content

cognesy/instructor-polyglot

Repository files navigation

Polyglot Package

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

About

[READ-ONLY] Access LLMs via unified API

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages