generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Halil Coşdu edited this page Apr 19, 2024
·
1 revision
# Laravel Finetuner
Laravel Finetuner is a package designed for the Laravel framework that automates the fine-tuning of OpenAI models. It simplifies the process of adjusting model parameters to optimize performance, tailored specifically for Laravel applications. This tool is ideal for developers looking to enhance AI capabilities in their projects efficiently, with minimal manual intervention.
## Installation
1. Install the package via composer:
composer require halilcosdu/laravel-finetuner
2. Publish the config file:
php artisan vendor:publish --tag="finetuner-config"
## Configuration
The published config file contains the following settings:
- `api_key`: Your OpenAI API key.
- `organization`: Your OpenAI organization.
- `request_timeout`: The request timeout for the OpenAI API.
- `use_storage`: Whether to use storage for training data.
- `storage`: The disk to use for storage.
## Usage
The Laravel Finetuner package provides several methods for fine-tuning OpenAI models:
- `generateExamples($prompt, $temperature = .4, $numberOfExamples = 2)`: Generates training examples for fine-tuning.
- `upload(string $file)`: Uploads the training data.
- `fineTune(string $fileId, string $model = 'gpt-3.5-turbo')`: Starts a fine-tuning job.
## Testing
You can run the tests for the Laravel Finetuner package with the following command:
composer test
## Contributing
Contributions to the Laravel Finetuner package are welcome. Please see the [CONTRIBUTING](CONTRIBUTING.md) file for details.
## License
The Laravel Finetuner package is licensed under the MIT License. Please see the [LICENSE](LICENSE.md) file for more information.