@dataclouder/nest-vertex 0.0.50 → 0.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -44,12 +44,12 @@ let ImageVertexService = ImageVertexService_1 = class ImageVertexService {
|
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
this.logger.log(`Vertex Image"Getting key for model: ${model} and tier: ${tierType}`);
|
|
47
|
-
availableKey = await this.keyBalancerApiService.
|
|
47
|
+
availableKey = await this.keyBalancerApiService.getBestKey({
|
|
48
48
|
provider: 'google',
|
|
49
49
|
model: model,
|
|
50
50
|
tierType: tierType,
|
|
51
51
|
aiType: key_balancer_models_1.ModelType.IMAGE,
|
|
52
|
-
});
|
|
52
|
+
}, null);
|
|
53
53
|
if (availableKey === null) {
|
|
54
54
|
this.logger.error('KEY BALANCER IS DOWN: :::: No available API key from key balancer.');
|
|
55
55
|
}
|
|
@@ -107,12 +107,12 @@ let GroqService = GroqService_1 = class GroqService {
|
|
|
107
107
|
}
|
|
108
108
|
try {
|
|
109
109
|
const file = await (0, groq_sdk_1.toFile)(fileBuffer, effectiveFileName, { type: mimeType });
|
|
110
|
-
const keyResult = await this.keyBalancer.
|
|
110
|
+
const keyResult = await this.keyBalancer.getBestKey({
|
|
111
111
|
provider: 'groq',
|
|
112
112
|
model: 'whisper-large-v3-turbo',
|
|
113
113
|
tierType: key_balancer_models_1.TierType.FREE_TIER,
|
|
114
114
|
aiType: key_balancer_models_1.ModelType.AUDIO,
|
|
115
|
-
});
|
|
115
|
+
}, null);
|
|
116
116
|
const transcription = await this.getClientWithKey(keyResult.key).audio.transcriptions.create({
|
|
117
117
|
file: file,
|
|
118
118
|
model: 'whisper-large-v3-turbo',
|