@umituz/react-native-ai-generation-content 1.88.1 → 1.88.2
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.88.
|
|
3
|
+
"version": "1.88.2",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -35,7 +35,7 @@ export {
|
|
|
35
35
|
isValidBase64, getBase64Size, getBase64SizeMB, prepareImage, createDevCallbacks, createFeatureUtils,
|
|
36
36
|
showVideoGenerationSuccess, handleGenerationError, showContentModerationWarning,
|
|
37
37
|
mapJobStatusToGenerationStatus, intensityToStrength,
|
|
38
|
-
resolveCoupleInput, prependContext,
|
|
38
|
+
resolveCoupleInput, prependContext, refinePromptForCouple,
|
|
39
39
|
} from "../infrastructure/utils";
|
|
40
40
|
export type {
|
|
41
41
|
IntervalOptions, StatusCheckResult, ResultValidation, ValidateResultOptions,
|
|
@@ -41,3 +41,21 @@ export function prependContext(
|
|
|
41
41
|
): string {
|
|
42
42
|
return context ? `${context}\n\n${basePrompt}` : basePrompt;
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Refines a prompt for couple mode by replacing singular terms with plural ones.
|
|
47
|
+
* Primarily used to fix "baked" prompts that were generated with singular defaults.
|
|
48
|
+
*/
|
|
49
|
+
export function refinePromptForCouple(prompt: string, isCouple: boolean): string {
|
|
50
|
+
if (!isCouple) return prompt;
|
|
51
|
+
|
|
52
|
+
return prompt
|
|
53
|
+
.replace(/The person must be/g, "Both people must be")
|
|
54
|
+
.replace(/the person is/gi, "both people are")
|
|
55
|
+
.replace(/Keep every facial feature/g, "Keep every facial feature for both people")
|
|
56
|
+
.replace(/the person/gi, "both people")
|
|
57
|
+
.replace(/facial feature/gi, "facial features")
|
|
58
|
+
.replace(/identical/g, "identical for both individuals")
|
|
59
|
+
.replace(/instantly recognizable/g, "instantly recognizable as themselves");
|
|
60
|
+
}
|
|
61
|
+
|