承接 performing/laravel-meilisearch-rag 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

performing/laravel-meilisearch-rag

Composer 安装命令:

composer require performing/laravel-meilisearch-rag

包简介

Meilisearch backed RAG indexing for Laravel applications.

README 文档

README

Meilisearch-backed RAG indexing for Laravel applications.

The package stores knowledge documents with plank/laravel-mediable, chunks extracted text, generates embeddings with laravel/ai, and indexes chunks into Meilisearch using user-provided vectors.

Installation

composer require performing/laravel-meilisearch-rag

For local path development, add the repository to the host app:

{
    "repositories": [
        {
            "type": "path",
            "url": "packages/laravel-meilisearch-rag"
        }
    ],
    "require": {
        "performing/laravel-meilisearch-rag": "*"
    }
}

Then run:

composer update performing/laravel-meilisearch-rag --with-dependencies

Configuration

Publish the config when you need to override defaults:

php artisan vendor:publish --tag=meilisearch-rag-config

Available environment variables:

MEILISEARCH_HOST=http://127.0.0.1:7700
MEILISEARCH_KEY=
KNOWLEDGE_MEILISEARCH_INDEX=knowledge_chunks
KNOWLEDGE_MEILISEARCH_EMBEDDER=default
KNOWLEDGE_EMBEDDING_PROVIDER=openrouter
KNOWLEDGE_EMBEDDING_MODEL=text-embedding-3-small
KNOWLEDGE_EMBEDDING_DIMENSIONS=1536
KNOWLEDGE_CHUNK_SIZE=1200
KNOWLEDGE_CHUNK_OVERLAP=200
KNOWLEDGE_SEARCH_LIMIT=6

The Meilisearch embedder is configured as userProvided, so Laravel generates embeddings and Meilisearch stores/searches the vectors.

Migrations

Publish the package migrations:

php artisan vendor:publish --tag=meilisearch-rag-migrations
php artisan migrate

The package expects Plank Mediable migrations to be installed in the host application.

Usage

Store typed text through the command bus:

use Performing\MeilisearchRag\Commands\KnowledgeTextStoreCommand;

command(KnowledgeTextStoreCommand::from([
    'title' => 'Shipping policy',
    'content' => 'Long-form knowledge content...',
]));

Search indexed chunks:

use Performing\MeilisearchRag\Support\KnowledgeEmbeddings;
use Performing\MeilisearchRag\Support\KnowledgeMeilisearch;

$embedding = app(KnowledgeEmbeddings::class)->embed('How long does shipping take?');
$chunks = app(KnowledgeMeilisearch::class)->search('How long does shipping take?', $embedding);

Available package commands:

  • KnowledgeTextStoreCommand
  • KnowledgeDocumentStoreCommand
  • KnowledgeDocumentUpdateCommand
  • KnowledgeDocumentReindexCommand
  • KnowledgeDocumentDeleteCommand

Handlers are registered by the package service provider.

Model

The package model is:

Performing\MeilisearchRag\Models\KnowledgeDocument

If the host app uses Mediable morph maps, map the document type to this class.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固