Save workspace changes

This commit is contained in:
2026-04-18 17:02:56 +02:00
parent f02ea9a711
commit 87d60af5a9
4220 changed files with 1388603 additions and 1554 deletions

View File

@@ -0,0 +1,54 @@
<?php
declare(strict_types=1);
namespace App\Services\Vision;
use App\Models\Artwork;
use Illuminate\Http\UploadedFile;
final class VectorService
{
public function __construct(
private readonly AiArtworkVectorSearchService $searchService,
private readonly ArtworkVectorIndexService $indexService,
) {
}
public function isConfigured(): bool
{
return $this->searchService->isConfigured();
}
/**
* @return list<array<string, mixed>>
*/
public function similarToArtwork(Artwork $artwork, int $limit = 12): array
{
return $this->searchService->similarToArtwork($artwork, $limit);
}
/**
* @return list<array<string, mixed>>
*/
public function searchByUploadedImage(UploadedFile $file, int $limit = 12): array
{
return $this->searchService->searchByUploadedImage($file, $limit);
}
/**
* @return array{url: string, metadata: array<string, mixed>}
*/
public function payloadForArtwork(Artwork $artwork): array
{
return $this->indexService->payloadForArtwork($artwork);
}
/**
* @return array{url: string, metadata: array<string, mixed>}
*/
public function upsertArtwork(Artwork $artwork): array
{
return $this->indexService->upsertArtwork($artwork);
}
}