@saooti/octopus-sdk 40.1.4 → 40.1.5
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
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:class="{ 'form-margin': displayLabel }"
|
|
5
5
|
>
|
|
6
6
|
<div class="d-flex align-items-center">
|
|
7
|
+
<slot name="complementLabel"/>
|
|
7
8
|
<component
|
|
8
9
|
:is="isWysiwyg? 'div': 'label'"
|
|
9
10
|
:class="[classLabel, displayLabel ? '' : 'd-none']"
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
</div>
|
|
34
35
|
<input
|
|
35
36
|
v-if="!isWysiwyg && !isTextarea"
|
|
37
|
+
v-show="showField"
|
|
36
38
|
:id="inputId"
|
|
37
39
|
ref="focusElement"
|
|
38
40
|
v-model="textValue"
|
|
@@ -52,6 +54,7 @@
|
|
|
52
54
|
/>
|
|
53
55
|
<textarea
|
|
54
56
|
v-else-if="isTextarea"
|
|
57
|
+
v-show="showField"
|
|
55
58
|
:id="inputId"
|
|
56
59
|
ref="focusElement"
|
|
57
60
|
v-model="textValue"
|
|
@@ -68,6 +71,7 @@
|
|
|
68
71
|
/>
|
|
69
72
|
<ClassicWysiwyg
|
|
70
73
|
v-else
|
|
74
|
+
v-show="showField"
|
|
71
75
|
v-model:content="textValue"
|
|
72
76
|
:error-description="
|
|
73
77
|
forceError || (isError && (undefined !== textValue || canBeNull))
|
|
@@ -153,6 +157,7 @@ export default defineComponent({
|
|
|
153
157
|
typeInput: { default: "text", type: String },
|
|
154
158
|
displayRequired: { default: false, type: Boolean },
|
|
155
159
|
classLabel: { default: "form-label", type: String },
|
|
160
|
+
showField: { default: true, type: Boolean },
|
|
156
161
|
},
|
|
157
162
|
emits: ["update:textInit", "update:errorVariable"],
|
|
158
163
|
data() {
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
export interface OpenAiParams {
|
|
2
|
-
frequencyPenalty: number | null; // -2 -> 2
|
|
3
|
-
presencePenalty: number | null; // -2 -> 2
|
|
4
|
-
temperature: number | null; // 0-> 2
|
|
5
|
-
promptKeyword: string | null;
|
|
6
|
-
promptKeywordAndSummary: string | null;
|
|
7
|
-
promptSummary: string | null;
|
|
8
2
|
promptLinkedin: string | null;
|
|
9
3
|
promptFacebook: string | null;
|
|
10
4
|
promptX: string | null;
|
|
11
5
|
preamble: string | null;
|
|
12
6
|
postamble: string | null;
|
|
7
|
+
summaryMaxWordNumbers: number|null;
|
|
8
|
+
maxChapters: number|null;
|
|
9
|
+
chapterMinSeconds: number|null;
|
|
13
10
|
}
|
|
14
11
|
export interface OpenAiHistory {
|
|
15
12
|
content: string;
|
|
@@ -18,23 +15,13 @@ export interface OpenAiHistory {
|
|
|
18
15
|
|
|
19
16
|
export function emptyOpenAiParams(): OpenAiParams {
|
|
20
17
|
return {
|
|
21
|
-
frequencyPenalty: null,
|
|
22
|
-
presencePenalty: null,
|
|
23
|
-
temperature: null,
|
|
24
18
|
postamble: null,
|
|
25
19
|
preamble: null,
|
|
26
20
|
promptFacebook: null,
|
|
27
|
-
promptKeyword: null,
|
|
28
|
-
promptKeywordAndSummary: null,
|
|
29
21
|
promptLinkedin: null,
|
|
30
|
-
promptSummary: null,
|
|
31
22
|
promptX: null,
|
|
23
|
+
summaryMaxWordNumbers: null,
|
|
24
|
+
maxChapters: null,
|
|
25
|
+
chapterMinSeconds: null
|
|
32
26
|
};
|
|
33
27
|
}
|
|
34
|
-
|
|
35
|
-
export function getLimitBottom(key: string): number {
|
|
36
|
-
if ("frequencyPenalty" === key || "presencePenalty" === key) {
|
|
37
|
-
return -2;
|
|
38
|
-
}
|
|
39
|
-
return 0;
|
|
40
|
-
}
|
|
@@ -1,23 +1,50 @@
|
|
|
1
1
|
export interface TranscriptParams {
|
|
2
|
-
automation: string;
|
|
2
|
+
automation: string; // super, {date}, false
|
|
3
|
+
ttsParams: TtsParams;
|
|
4
|
+
modifyPodcast: ModifyPodcastConfig
|
|
5
|
+
}
|
|
6
|
+
export interface TtsParams {
|
|
7
|
+
super: string;
|
|
8
|
+
style: string;
|
|
9
|
+
pitch: number;
|
|
10
|
+
speed: number;
|
|
11
|
+
voice: string;
|
|
12
|
+
language: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ModifyPodcastConfig {
|
|
16
|
+
modifyChaptering: ModifyPodcastEnum;
|
|
17
|
+
modifyKeywords: ModifyPodcastEnum;
|
|
18
|
+
modifyDescription: ModifyPodcastEnum;
|
|
19
|
+
createDescriptionUsingAi: boolean;
|
|
3
20
|
wordsNumber: number;
|
|
4
|
-
modifyDescription: string;
|
|
5
|
-
isWordsNumber: boolean;
|
|
6
|
-
openAiBehavior: string; //no, keywords, description, descriptionAndKeywords
|
|
7
|
-
ttsParams: { [key: string]: string | number | undefined };
|
|
8
21
|
}
|
|
9
22
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
23
|
+
export enum ModifyPodcastEnum {
|
|
24
|
+
SUPER = "SUPER",
|
|
25
|
+
NO = "NO",
|
|
26
|
+
IF_EMPTY = "IF_EMPTY",
|
|
27
|
+
OVERWRITE="OVERWRITE"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function defaultTtsParams(): TtsParams {
|
|
14
31
|
return {
|
|
15
|
-
|
|
32
|
+
super: "true",
|
|
33
|
+
style: "neutral",
|
|
34
|
+
pitch: 0,
|
|
35
|
+
speed: 1,
|
|
36
|
+
voice: "",
|
|
37
|
+
language: ""
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function defaultModifyPodcastConfig(): ModifyPodcastConfig {
|
|
42
|
+
return {
|
|
43
|
+
modifyChaptering: ModifyPodcastEnum.NO,
|
|
44
|
+
modifyKeywords:ModifyPodcastEnum.NO,
|
|
45
|
+
modifyDescription:ModifyPodcastEnum.NO,
|
|
46
|
+
createDescriptionUsingAi: false,
|
|
16
47
|
wordsNumber: 100,
|
|
17
|
-
modifyDescription: modifyDescription ?? "NO",
|
|
18
|
-
isWordsNumber: true,
|
|
19
|
-
openAiBehavior: "no",
|
|
20
|
-
ttsParams: {},
|
|
21
48
|
};
|
|
22
49
|
}
|
|
23
50
|
|
|
@@ -30,3 +57,9 @@ export interface Voice {
|
|
|
30
57
|
styles?: [];
|
|
31
58
|
provider: string;
|
|
32
59
|
}
|
|
60
|
+
export interface ProviderTts {
|
|
61
|
+
name: string;
|
|
62
|
+
fullName: string;
|
|
63
|
+
logoPath: string;
|
|
64
|
+
description: string;
|
|
65
|
+
}
|