vidspotai-shared 1.0.105 → 1.0.107-dev.0
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/lib/globals/aiModels/enums.d.ts +0 -2
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +0 -2
- package/lib/globals/aiModels/providers/bytedance.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/bytedance.js +4 -89
- package/lib/globals/types.d.ts +3 -1
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +8 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +1 -0
- package/lib/models/organization.model.d.ts +72 -0
- package/lib/models/organization.model.d.ts.map +1 -0
- package/lib/models/organization.model.js +6 -0
- package/lib/models/user.model.d.ts +12 -0
- package/lib/models/user.model.d.ts.map +1 -1
- package/lib/models/video.model.d.ts +7 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.js +0 -8
- package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/generateVideo.tool.js +0 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +0 -2
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +3 -6
- package/lib/services/credit.service.d.ts +4 -2
- package/lib/services/credit.service.d.ts.map +1 -1
- package/lib/services/credit.service.js +113 -2
- package/lib/services/email/index.d.ts +3 -0
- package/lib/services/email/index.d.ts.map +1 -0
- package/lib/services/email/index.js +18 -0
- package/lib/services/email/orgInvite.d.ts +25 -0
- package/lib/services/email/orgInvite.d.ts.map +1 -0
- package/lib/services/email/orgInvite.js +113 -0
- package/lib/services/email/resendClient.d.ts +12 -0
- package/lib/services/email/resendClient.d.ts.map +1 -0
- package/lib/services/email/resendClient.js +39 -0
- package/lib/services/firestore.service.d.ts +5 -0
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +13 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +2 -0
- package/lib/services/organizationCredit.service.d.ts +36 -0
- package/lib/services/organizationCredit.service.d.ts.map +1 -0
- package/lib/services/organizationCredit.service.js +105 -0
- package/lib/services/translation/translation.service.d.ts.map +1 -1
- package/lib/services/translation/translation.service.js +9 -23
- package/package.json +2 -1
|
@@ -199,29 +199,15 @@ async function callLlmDetect(text) {
|
|
|
199
199
|
"code of the language the user's text is written in — two lowercase " +
|
|
200
200
|
'letters, nothing else (e.g. "es", "ja", "ar"). Use "zh-cn" or "zh-tw" ' +
|
|
201
201
|
"for Chinese. No punctuation, no explanation.";
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
// keeps this cheap when a long-form brief triggers the fallback.
|
|
212
|
-
input: [
|
|
213
|
-
{ role: "system", content: system },
|
|
214
|
-
{ role: "user", content: text.slice(0, 1000) },
|
|
215
|
-
],
|
|
216
|
-
modelKey: FALLBACK_MODEL,
|
|
217
|
-
options: { temperature: 0 },
|
|
218
|
-
}),
|
|
219
|
-
new Promise((_, reject) => {
|
|
220
|
-
timer = setTimeout(() => reject(new Error(`LLM detect timed out after ${FALLBACK_TIMEOUT_MS}ms`)), FALLBACK_TIMEOUT_MS);
|
|
221
|
-
}),
|
|
222
|
-
]).finally(() => {
|
|
223
|
-
if (timer)
|
|
224
|
-
clearTimeout(timer);
|
|
202
|
+
const { text: out } = await service.generateText({
|
|
203
|
+
// Only the opening slice matters for identification, and capping it keeps
|
|
204
|
+
// this cheap when a long-form brief triggers the fallback.
|
|
205
|
+
input: [
|
|
206
|
+
{ role: "system", content: system },
|
|
207
|
+
{ role: "user", content: text.slice(0, 1000) },
|
|
208
|
+
],
|
|
209
|
+
modelKey: FALLBACK_MODEL,
|
|
210
|
+
options: { temperature: 0 },
|
|
225
211
|
});
|
|
226
212
|
const code = (out ?? "").trim().toLowerCase().replace(/[^a-z-]/g, "");
|
|
227
213
|
if (!/^[a-z]{2}(-[a-z]{2})?$/.test(code)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vidspotai-shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.107-dev.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"jsonwebtoken": "^9.0.2",
|
|
31
31
|
"logform": "^2.7.0",
|
|
32
32
|
"openai": "^6.1.0",
|
|
33
|
+
"resend": "^6.19.0",
|
|
33
34
|
"winston": "^3.19.0",
|
|
34
35
|
"winston-loki": "^6.1.3",
|
|
35
36
|
"winston-slack-webhook-transport": "^2.3.6",
|