Download the PHP package nomanur/laravel-markdown-rag without Composer

On this page you can find all versions of the php package nomanur/laravel-markdown-rag. 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 laravel-markdown-rag

Laravel Markdown RAG

Latest Version on Packagist Total Downloads

Laravel Markdown RAG is a package that allows you to build a Retrieval-Augmented Generation (RAG) system using Markdown files as your knowledge base.

For more details, please visit https://nomanur.github.io/laravel-markdown-rag/.

Installation

You can install the package via composer:

Publish the package assets and configuration:

Run the migrations:

Configuration

Add the following environment variables to your .env file:

To use the configuration, update the code in config/ai.php with:

Usage

1. Register Routes

Run the following command to register the necessary routes:

2. Setup Knowledge Base

Create a folder for your markdown files within the public directory. By default, this is public/knowledge-base, but you can change it using the MARKDOWN_INFO_PATH environment variable. Add your .md files there.

Example:

3. Indexing

Index your markdown files to make them searchable:

4. Start Queue Worker

Start the queue worker to process background jobs:

5. Accessing the Interface

You can access the chat interface at the following URL: your-domain.com/markdownrag

6. Customizing Message History

By default, KnowledgeAgent retrieves messages from the History model. You can customize how messages are resolved using one of the following options:

Option 1: Global override in AppServiceProvider

Use the resolveMessagesUsing static method to customize message resolution globally:

Option 2: Inheritance in another project

If you are extending the agent in another project, you can override the messages() method directly:

7. Customizing Instructions

By default, KnowledgeAgent retrieves its instructions from the associated document's system_prompt or falls back to a default prompt. You can customize the agent's instructions using one of the following options:

Option 1: Global override in AppServiceProvider

Use the resolveInstructionsUsing static method to customize instructions globally:

Option 2: Inheritance in another project

You can also override the instructions() method directly by extending the agent:

8. Customizing Tool Descriptions

You can also override the description of the KnowledgeSearchTool globally. This is useful if you want to give the AI more specific instructions about when to use the search tool:

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-markdown-rag with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0|^12.0
livewire/livewire Version ^3.0|^4.0
laravel/ai Version ^0.2.5
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 nomanur/laravel-markdown-rag contains the following files

Loading the files please wait ...