Download the PHP package byte5/ai-entry-embeddings without Composer

On this page you can find all versions of the php package byte5/ai-entry-embeddings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ai-entry-embeddings

AI Entry Embeddings

AI Entry Embeddings is a Statamic addon that automatically extracts content from entries, splits it into meaningful chunks with metadata, and generates vector embeddings using Laravel AI SDK. Designed for building RAG (Retrieval-Augmented Generation) search experiences on top of your Statamic content.

How It Works

When an entry is saved in Statamic:

  1. The extraction pipeline walks through configured fields, producing ContentChunk objects -- each with the extracted text, the originating field handle, a dot-notation path (e.g. page_builder.pricing_block.0), and structured metadata.
  2. Chunks are stored in the ai_entry_embeddings PostgreSQL table, replacing any previous chunks for that entry.
  3. A queued job calls the Laravel AI SDK to generate vector embeddings for each chunk and writes them back to the database.

The result is a table of chunk-level embeddings you can query with pgvector for similarity search, knowing exactly which section of which entry matched.

Requirements

Installation

Publish the configuration file:

Run migrations (this will enable the pgvector extension and create the ai_entry_embeddings table):

Configuration

The configuration file is published to config/ai-entry-embeddings.php.

Collections and Fields

You must explicitly list which collections and fields to extract. Nothing is extracted by default -- this prevents accidentally exposing sensitive data to the AI.

To use a custom extractor for a specific field, pass an array of extractor classes:

Embedding Dimensions

This value is used both during migration (to size the database column) and at runtime (when calling the embedding API). Changing it after the initial migration requires a new migration to alter the column size, and all existing embeddings must be regenerated since vectors of different dimensions are incompatible.

Only Published

When enabled (default), draft entries are skipped:

Field Type Extractors

The addon ships with extractors for common Statamic field types:

Field Type Extractor Behavior
text ExtractTextField Returns the raw string value
textarea ExtractTextField Returns the raw string value
markdown ExtractMarkdownField Converts Markdown to HTML, then strips to plain text
bard ExtractBardField Splits prose and sets into separate chunks
replicator ExtractReplicatorField One chunk per set, with nested field extraction
grid ExtractGridField One chunk per row, with nested column extraction
select ExtractSelectField Returns the option label(s)

You can override or add mappings in the default_field_extractors config key.

Field types listed in ignored_field_types (e.g. toggle, assets, date) are never extracted.

Extending

Custom Field Extractor

Implement FieldExtractorInterface and return an array of ContentChunk objects:

Register it either globally in config:

Or per-field in a collection:

Events

Event When Payload
ContentExtracted Chunks were successfully extracted ExtractionPayload
EmptyExtractionCompleted Extraction completed with zero chunks ExtractionPayload

Control Panel

The addon registers a navigation section under AI Tools in the Statamic control panel, with a landing page and an embeddings overview. Access is gated by the view AI entry embeddings permission.

License

This addon is open-sourced software licensed under the GNU General Public License v3.0 (GPL-3.0). See LICENSE for details.


All versions of ai-entry-embeddings with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
statamic/cms Version ^6.0
laravel/ai Version ^0.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package byte5/ai-entry-embeddings contains the following files

Loading the files please wait ...