feat: ship creator journey v2 and profile updates

This commit is contained in:
2026-04-12 21:42:07 +02:00
parent a2457f4e49
commit d5cff21ea2
335 changed files with 20147 additions and 1545 deletions

View File

@@ -12,6 +12,8 @@ use RuntimeException;
final class AiArtworkVectorSearchService
{
private const MAX_SIMILAR_RESULTS = 120;
public function __construct(
private readonly VectorGatewayClient $client,
private readonly ArtworkVisionImageUrl $imageUrl,
@@ -28,7 +30,7 @@ final class AiArtworkVectorSearchService
*/
public function similarToArtwork(Artwork $artwork, int $limit = 12): array
{
$safeLimit = max(1, min(24, $limit));
$safeLimit = max(1, min(self::MAX_SIMILAR_RESULTS, $limit));
$cacheKey = sprintf('rec:artwork:%d:similar-ai:%d', $artwork->id, $safeLimit);
$ttl = max(60, (int) config('recommendations.ttl.similar_artworks', 30 * 60));
@@ -49,7 +51,7 @@ final class AiArtworkVectorSearchService
*/
public function searchByUploadedImage(UploadedFile $file, int $limit = 12): array
{
$safeLimit = max(1, min(24, $limit));
$safeLimit = max(1, min(self::MAX_SIMILAR_RESULTS, $limit));
$path = $file->store('ai-search/tmp', 'public');
if (! is_string($path) || $path === '') {