Download the PHP package iamgerwin/nova-ai-context-aware-input without Composer

On this page you can find all versions of the php package iamgerwin/nova-ai-context-aware-input. 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 nova-ai-context-aware-input

Nova AI Context-Aware Input

Latest Version on Packagist Total Downloads License

A Laravel Nova field that brings the power of AI to your admin panel, enhancing text input with intelligent, context-aware suggestions. Seamlessly integrates with Nova's workflow while providing real-time text improvements powered by leading AI providers.

Think of it as having a professional editor looking over your shoulder, understanding the context of your entire form, and offering thoughtful improvements—without disrupting your natural writing flow.

Features

Core Capabilities

Performance & Security

Developer Experience

Requirements

Installation

Install the package via Composer:

Publish the configuration file:

Build the Nova assets:

Or if you prefer using the root directory:

Quick Start

1. Configure Your AI Provider

Add your API key to your .env file:

2. Use the Field in Your Nova Resource

Replace the standard Textarea field with TextImprove:

That's it! Your field now has AI-powered text improvement capabilities.

Configuration

The package comes with extensive configuration options. Here are the key settings:

Default Provider

Field Defaults

Rate Limiting

Format: scope:max_attempts,decay_minutes

Caching

Security

Usage Examples

Basic Usage

Advanced Configuration

Custom Styling

Available styles:

Context-Aware Improvements

Leverage contextual information for smarter suggestions:

Available Providers

OpenAI

Environment variables:

Anthropic Claude

Environment variables:

DeepSeek

Environment variables:

Azure OpenAI

Environment variables:

Context Providers

Context providers enrich AI suggestions by providing relevant information about the form, user, and resource being edited.

Sibling Fields Provider

Includes data from other fields in the form:

This helps the AI understand the broader context. For example, when improving a product description, it knows the product's title and category.

User Persona Provider

Includes information about the authenticated user:

Helps tailor suggestions to the user's context and language.

Resource Snapshot Provider

Provides context about the resource being edited:

Policy Hints Provider

Enforces content policies and guidelines:

You can also add custom hints per field:

Disabling Context Providers

Security Features

PII Detection

The package automatically detects and warns about potential PII (Personally Identifiable Information) before sending data to AI providers:

When PII is detected, the request is blocked and an error is returned.

Input Validation

Rate Limiting

Prevent abuse with configurable rate limits:

Caching

Reduce costs and improve performance by caching improvements:

Events

The package dispatches events you can listen to:

TextImproved Event

Fired when text is successfully improved:

SuggestionDiscarded Event

Fired when a user discards an AI suggestion:

Customizing Prompts

You can customize the system and user prompts sent to AI providers:

Available placeholders:

Testing

Run the test suite:

Run tests with coverage:

Run static analysis:

Format code (PSR-12):

Performance Tips

  1. Enable caching to reduce API calls for similar content
  2. Use rate limiting to control costs
  3. Choose appropriate models: Smaller models (gpt-4o-mini, claude-3-haiku) for simple improvements, larger models for complex content
  4. Set reasonable minLength to avoid processing very short inputs
  5. Use trigger='manual' for fields where AI assistance is optional

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

Development Setup

  1. Clone the repository
  2. Install dependencies: composer install && npm install
  3. Copy .env.example to .env and add your API keys
  4. Run tests: composer test

Changelog

Please see CHANGELOG.md for recent changes.

Security

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

License

The MIT License (MIT). Please see LICENSE.md for more information.

Credits

Acknowledgments

Special thanks to the Laravel and Nova communities for their excellent frameworks and tools that made this package possible.


Made with care for the Laravel community.


All versions of nova-ai-context-aware-input with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.8
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/cache Version ^10.0|^11.0|^12.0
laravel/nova Version ^4.0|^5.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 iamgerwin/nova-ai-context-aware-input contains the following files

Loading the files please wait ...