PHPackages                             coodde/eliact - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. coodde/eliact

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

coodde/eliact
=============

AI-powered structured input parser for PHP. Extract structured data (names, emails, dates, etc) from natural language using LLMs like OpenAI.

20PHP

Since Jul 21Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/coodde/Eliact)[ Packagist](https://packagist.org/packages/coodde/eliact)[ RSS](/packages/coodde-eliact/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Eliact - LLM-based structered parsing
=====================================

[](#eliact---llm-based-structered-parsing)

**Eliact** — AI-powered structured input parser for PHP. Extracts names, emails, dates and more from natural language using LLMs.

✨ Features
----------

[](#-features)

- Support for multiple AI providers (OpenAI, DeepSeek, Claude, Mistral, Ollama)
- Flexible schema-based extraction (JSON → validated array)
- DTO hydration (convert to custom objects)
- Driver fallback with `ChainDriver`
- Caching with PSR-16 or in-memory (`MemoryCache`)

🚀 Basic usage
-------------

[](#-basic-usage)

```
$driver = DriverFactory::make('openai', 'sk-...');
$eliact = new Eliact($driver);

$data = $eliact->parse("My name is John and my email is john@example.com", [
    'name' => 'string',
    'email' => 'email'
]);
```

🧱 With DTO
----------

[](#-with-dto)

```
class ContactDto {
    public function __construct(
        public string $name,
        public string $email
    ) {}
}

$dto = $eliact->parseToDto("I'm Alice. My email is alice@mail.com", [
    'name' => 'string',
    'email' => 'email'
], ContactDto::class);
```

🔁 Chain + Cache example
-----------------------

[](#-chain--cache-example)

```
$chain = new ChainDriver([
    DriverFactory::make('deepseek', 'xxx'),
    DriverFactory::make('openai', 'yyy')
]);

$cached = new CacheWrapper($chain, new MemoryCache());
$eliact = new Eliact($cached);
```

📦 Installation
--------------

[](#-installation)

```
composer require coodde/eliact
```

⌨️ Supported Input Types
------------------------

[](#️-supported-input-types)

- Text
- URL / HTML
- Image
- Audio

🌐 Supported Providers
---------------------

[](#-supported-providers)

- OpenAI: gpt-4o, gpt-4, gpt-3.5-turbo
- Anthropic: claude-3-opus, claude-3-sonnet, claude-3-haiku
- Google: gemini-1.5-pro, gemini-1.5-flash
- DeepSeek: deepseek-chat, deepseek-vl
- Mistral: mistral-7b, mixtral-8x7b
- Ollama: llama3, gemma, llava, bakllava

✅ Supported Data Types
----------------------

[](#-supported-data-types)

- bool
- country-code
- credit-card
- date (parsed to Y-m-d)
- datetime
- email
- float
- int
- month
- phone
- safe-string
- string
- time
- url
- uuid
- year
- zip-code

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance40

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/464efd2d107c09841c0c838df8c6f950fab528bcc847d16ae5611de34d2c0c50?d=identicon)[coodde](/maintainers/coodde)

---

Top Contributors

[![coodde](https://avatars.githubusercontent.com/u/143871155?v=4)](https://github.com/coodde "coodde (3 commits)")[![svyat-r](https://avatars.githubusercontent.com/u/44367867?v=4)](https://github.com/svyat-r "svyat-r (2 commits)")

### Embed Badge

![Health badge](/badges/coodde-eliact/health.svg)

```
[![Health](https://phpackages.com/badges/coodde-eliact/health.svg)](https://phpackages.com/packages/coodde-eliact)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
