changed modelname
This commit is contained in:
parent
7403bc9044
commit
9a7e13e981
1944
package-lock.json
generated
1944
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -20,13 +20,14 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.32.1",
|
||||
"@anthropic-ai/sdk": "^0.71.0",
|
||||
"@aws-sdk/client-s3": "^3.929.0",
|
||||
"async-retry": "^1.3.3",
|
||||
"compression": "^1.7.4",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.21.2",
|
||||
"file-type": "^18.7.0",
|
||||
"file-type": "^16.5.4",
|
||||
"helmet": "^8.0.0",
|
||||
"joi": "^17.13.3",
|
||||
"morgan": "^1.10.0",
|
||||
|
||||
@ -18,7 +18,7 @@ class ClaudeAIProvider extends IImageTaggingService {
|
||||
}
|
||||
this.client = new Anthropic({ apiKey });
|
||||
this.logger = logger;
|
||||
this.model = 'claude-sonnet-4-20250514';
|
||||
this.model = 'claude-sonnet-4-5';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
const { S3Client, ListObjectsV2Command, GetObjectCommand } = require('@aws-sdk/client-s3');
|
||||
const { ValidationError, NotFoundError } = require('../../shared/errors/AppError');
|
||||
const { fileTypeFromBuffer } = require('file-type');
|
||||
const fileTypeLib = require('file-type');
|
||||
|
||||
/**
|
||||
* S3 Service - handles S3 operations for image fetching
|
||||
@ -234,7 +234,7 @@ class S3Service {
|
||||
const buffer = Buffer.concat(chunks);
|
||||
|
||||
// Validate file type
|
||||
const fileType = await fileTypeFromBuffer(buffer);
|
||||
const fileType = await fileTypeLib.fromBuffer(buffer);
|
||||
if (!fileType) {
|
||||
throw new ValidationError('Unable to determine file type');
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
const { fileTypeFromBuffer } = require('file-type');
|
||||
const fileTypeLib = require('file-type');
|
||||
const sharp = require('sharp');
|
||||
const { ValidationError } = require('../../shared/errors/AppError');
|
||||
|
||||
@ -35,7 +35,7 @@ class ImageValidator {
|
||||
}
|
||||
|
||||
// Validate actual file type using magic numbers
|
||||
const fileType = await fileTypeFromBuffer(file.buffer);
|
||||
const fileType = await fileTypeLib.fromBuffer(file.buffer);
|
||||
if (!fileType) {
|
||||
throw new ValidationError('Unable to determine file type');
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ const requestIdMiddleware = require('./presentation/middleware/requestId');
|
||||
const logger = require('./shared/utils/logger');
|
||||
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 3000;
|
||||
const PORT = process.env.PORT || 3001;
|
||||
|
||||
// Middleware
|
||||
app.use(helmet());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user