LLM reel caption and video description + Refactor in services
This commit is contained in:
36
app/Providers/VideoDescriptorServiceProvider.php
Normal file
36
app/Providers/VideoDescriptorServiceProvider.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Services\AIPrompt\OpenAPIPrompt;
|
||||
use App\Services\FileTools\OCR\IImageOCR;
|
||||
use App\Services\FileTools\VideoDescriptor\IVideoDescriptor;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class VideoDescriptorServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
// Register the VideoDescriptor service
|
||||
$this->app->singleton(IVideoDescriptor::class, function ($app) {
|
||||
return new \App\Services\FileTools\VideoDescriptor\LLMFullVideoDescriptor(
|
||||
$app->make(IImageOCR::class),
|
||||
$app->make(OpenAPIPrompt::class)
|
||||
);
|
||||
});
|
||||
|
||||
// Register the VideoDescriptor service
|
||||
$this->app->singleton(\App\Browser\Jobs\InstagramRepost\ReelDescriptor::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user