Polyglot has been developed as part of Instructor for PHP, but can be used as a standalone library.

Currently, Polyglot is focused on chat completion and embeddings generation APIs.

NOTE: Library, its documentation and examples are still in development. Please report any issues or suggestions.

Supported chat completion providers

  • A21
  • Anthropic
  • Microsoft Azure
  • Cerebras
  • Cohere (native and OpenAI compatible)
  • Deepseek
  • Google Gemini (native and OpenAI compatible)
  • Groq
  • Minimaxi
  • Mistral
  • Moonshot
  • Ollama
  • OpenAI
  • OpenRouter
  • Perplexity
  • SambaNova
  • Together
  • xAI

Supported embeddings providers

  • Cohere
  • Google Gemini
  • Jina
  • Microsoft Azure
  • Mistral
  • Ollama
  • OpenAI