@saooti/octopus-sdk 40.1.4 → 40.1.6
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 +1 -1
- package/plateform.conf +1 -1
- package/src/components/display/podcasts/ParticipantDescription.vue +28 -0
- package/src/components/display/podcasts/PodcastList.vue +3 -1
- package/src/components/display/podcasts/PodcastModuleBox.vue +1 -0
- package/src/components/display/podcasts/TagList.vue +19 -5
- package/src/components/form/ClassicInputText.vue +5 -0
- package/src/components/pages/TagPage.vue +85 -0
- package/src/locale/de.ts +1 -0
- package/src/locale/en.ts +1 -0
- package/src/locale/es.ts +1 -0
- package/src/locale/fr.ts +1 -0
- package/src/locale/it.ts +1 -0
- package/src/locale/sl.ts +1 -0
- package/src/router/router.ts +16 -0
- package/src/stores/class/openai/openAiParams.ts +6 -19
- package/src/stores/class/transcript/transcriptParams.ts +47 -14
- package/src/style/general.scss +0 -25
package/package.json
CHANGED
package/plateform.conf
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
dev2.saooti.org
|
|
@@ -44,3 +44,31 @@ export default defineComponent({
|
|
|
44
44
|
},
|
|
45
45
|
});
|
|
46
46
|
</script>
|
|
47
|
+
<style lang="scss">
|
|
48
|
+
.octopus-app{
|
|
49
|
+
/** Comma list style */
|
|
50
|
+
.comma {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-wrap: wrap;
|
|
53
|
+
align-items: center;
|
|
54
|
+
margin: 0.5rem 0;
|
|
55
|
+
|
|
56
|
+
> a{
|
|
57
|
+
text-transform: capitalize;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
> a, .comma-element {
|
|
61
|
+
&::after {
|
|
62
|
+
content: ", ";
|
|
63
|
+
margin-right: 0.2rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:last-child {
|
|
67
|
+
&::after {
|
|
68
|
+
content: "";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -91,6 +91,7 @@ export default defineComponent({
|
|
|
91
91
|
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
92
92
|
justSizeChosen: { default: false, type: Boolean },
|
|
93
93
|
withVideo: { default: undefined, type: Boolean },
|
|
94
|
+
includeTag:{ default: () => [], type: Array as () => Array<string> },
|
|
94
95
|
},
|
|
95
96
|
emits: ["fetch", "emptyList"],
|
|
96
97
|
|
|
@@ -129,7 +130,7 @@ export default defineComponent({
|
|
|
129
130
|
return `${this.organisation}|${this.emissionId}|${this.sortCriteria}|${this.sort}
|
|
130
131
|
${this.iabId}|${this.participantId}|${this.query}|${this.monetisable}|${this.popularSort}|
|
|
131
132
|
${this.rubriqueId}|${this.rubriquageId}|${this.before}|${this.after}|${this.includeHidden}|${this.noRubriquageId}|${this.validity}|
|
|
132
|
-
${this.withVideo}`;
|
|
133
|
+
${this.withVideo}|${this.includeTag}`;
|
|
133
134
|
},
|
|
134
135
|
organisation(): Array<string> {
|
|
135
136
|
if (this.organisationId) {
|
|
@@ -214,6 +215,7 @@ export default defineComponent({
|
|
|
214
215
|
: undefined, */
|
|
215
216
|
includeStatus: ["READY", "PROCESSING"],
|
|
216
217
|
withVideo: this.withVideo,
|
|
218
|
+
includeTag: this.includeTag.length ? this.includeTag : undefined,
|
|
217
219
|
};
|
|
218
220
|
try {
|
|
219
221
|
const data = await classicApi.fetchData<ListClassicReturn<Podcast>>({
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="undefined !== tagList && 0 !== tagList.length"
|
|
4
|
-
class="tag-list-component d-flex align-items-center flex-wrap
|
|
4
|
+
class="tag-list-component d-flex align-items-center flex-wrap mb-3 small-text"
|
|
5
5
|
>
|
|
6
6
|
<div class="fw-bold me-3">
|
|
7
7
|
{{ $t("Podcast tags") + " : " }}
|
|
8
8
|
</div>
|
|
9
|
-
<
|
|
9
|
+
<router-link
|
|
10
10
|
v-for="(tag, index) in tagList"
|
|
11
11
|
:key="tag"
|
|
12
|
-
class="d-flex align-items-center
|
|
13
|
-
:
|
|
12
|
+
class="d-flex align-items-center border p-1 m-1 text-dark"
|
|
13
|
+
:to="{
|
|
14
|
+
name: 'tag',
|
|
15
|
+
params: { tag: tag},
|
|
16
|
+
query: organisationQuery
|
|
17
|
+
}"
|
|
14
18
|
>
|
|
15
19
|
<template v-if="!isOuestFranceTag(tag)">{{ tag }}</template>
|
|
16
20
|
<template v-else>
|
|
@@ -35,7 +39,7 @@
|
|
|
35
39
|
:is-fixed="true"
|
|
36
40
|
/>
|
|
37
41
|
</template>
|
|
38
|
-
</
|
|
42
|
+
</router-link>
|
|
39
43
|
</div>
|
|
40
44
|
</template>
|
|
41
45
|
|
|
@@ -45,6 +49,8 @@ const ClassicPopover = defineAsyncComponent(
|
|
|
45
49
|
() => import("../../misc/ClassicPopover.vue"),
|
|
46
50
|
);
|
|
47
51
|
import {useTagOf} from "../../composable/useTagOf";
|
|
52
|
+
import { useFilterStore } from "@/stores/FilterStore";
|
|
53
|
+
import { mapState } from "pinia";
|
|
48
54
|
export default defineComponent({
|
|
49
55
|
name: "TagList",
|
|
50
56
|
components: {
|
|
@@ -58,12 +64,20 @@ export default defineComponent({
|
|
|
58
64
|
[key: string]: string | number | boolean | undefined;
|
|
59
65
|
},
|
|
60
66
|
},
|
|
67
|
+
orgaId: {default: "", type: String,},
|
|
61
68
|
},
|
|
62
69
|
setup(){
|
|
63
70
|
const { isOuestFranceTag, formateOfTag } = useTagOf();
|
|
64
71
|
return { isOuestFranceTag, formateOfTag }
|
|
65
72
|
},
|
|
66
73
|
computed: {
|
|
74
|
+
...mapState(useFilterStore, ["filterOrgaId"]),
|
|
75
|
+
organisationQuery(){
|
|
76
|
+
if(this.filterOrgaId){
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
return { o: this.orgaId};
|
|
80
|
+
},
|
|
67
81
|
ouestFranceMainTag(): string | undefined {
|
|
68
82
|
if (this.podcastAnnotations?.["mainOfTag"]) {
|
|
69
83
|
for (const key in this.podcastAnnotations) {
|
|
@@ -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() {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="page-box tag-page">
|
|
3
|
+
<h1>
|
|
4
|
+
{{ $t("Search for keyword", {tag:tagDisplay})}}
|
|
5
|
+
<img
|
|
6
|
+
v-if="isOf"
|
|
7
|
+
width="30"
|
|
8
|
+
height="30"
|
|
9
|
+
class="ouest-france-logo-tag-page"
|
|
10
|
+
role="presentation"
|
|
11
|
+
alt=""
|
|
12
|
+
src="/img/ouest_france_logo.svg"
|
|
13
|
+
/>
|
|
14
|
+
</h1>
|
|
15
|
+
<ProductorSearch
|
|
16
|
+
v-model:organisation-id="organisationId"
|
|
17
|
+
v-model:search-pattern="searchPattern"
|
|
18
|
+
/>
|
|
19
|
+
<PodcastList
|
|
20
|
+
:first="paginateFirst"
|
|
21
|
+
:size="ps"
|
|
22
|
+
:include-tag="[tag]"
|
|
23
|
+
:organisation-id="orgaArray"
|
|
24
|
+
:query="searchMinSize"
|
|
25
|
+
:sort-criteria="sortOrder ?? 'DATE'"
|
|
26
|
+
/>
|
|
27
|
+
</section>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { useSimplePageParam } from "../composable/route/useSimplePageParam";
|
|
32
|
+
import { useTagOf } from "../composable/useTagOf";
|
|
33
|
+
import PodcastList from "../display/podcasts/PodcastList.vue";
|
|
34
|
+
import { computed, defineAsyncComponent, ref, watch } from "vue";
|
|
35
|
+
const ProductorSearch = defineAsyncComponent(
|
|
36
|
+
() => import("../display/filter/ProductorSearch.vue"),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const props = defineProps({
|
|
40
|
+
pr: { default: 0, type: Number },
|
|
41
|
+
ps: { default: 30, type: Number },
|
|
42
|
+
tag: { default: undefined, type: String },
|
|
43
|
+
routeOrga: { default: undefined, type: String },
|
|
44
|
+
routeQuery: { default: "", type: String },
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const {
|
|
48
|
+
searchPattern,
|
|
49
|
+
organisationId,
|
|
50
|
+
searchMinSize,
|
|
51
|
+
paginateFirst,
|
|
52
|
+
} = useSimplePageParam(props);
|
|
53
|
+
|
|
54
|
+
const { isOuestFranceTag, formateOfTag } = useTagOf();
|
|
55
|
+
|
|
56
|
+
const orgaArray = computed(() =>organisationId.value ? [organisationId.value] : []);
|
|
57
|
+
const tagDisplay = computed(() => {
|
|
58
|
+
const tagString = props.tag?? "";
|
|
59
|
+
return isOf.value ? formateOfTag(tagString) :tagString;
|
|
60
|
+
});
|
|
61
|
+
const isOf = computed(() => {
|
|
62
|
+
return isOuestFranceTag(props.tag?? "");
|
|
63
|
+
});
|
|
64
|
+
const sortOrder = computed(() =>{
|
|
65
|
+
if(searchMinSize.value.length){
|
|
66
|
+
return "SCORE";
|
|
67
|
+
}
|
|
68
|
+
return undefined;
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
</script>
|
|
72
|
+
<style lang="scss">
|
|
73
|
+
.octopus-app .tag-page{
|
|
74
|
+
.ouest-france-logo-tag-page{
|
|
75
|
+
width: 30px;
|
|
76
|
+
height: 30px;
|
|
77
|
+
margin-left: 10px;
|
|
78
|
+
vertical-align: center;
|
|
79
|
+
@media (width <= 500px) {
|
|
80
|
+
width: 20px;
|
|
81
|
+
height: 20px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
package/src/locale/de.ts
CHANGED
package/src/locale/en.ts
CHANGED
package/src/locale/es.ts
CHANGED
package/src/locale/fr.ts
CHANGED
package/src/locale/it.ts
CHANGED
package/src/locale/sl.ts
CHANGED
package/src/router/router.ts
CHANGED
|
@@ -24,6 +24,7 @@ const ParticipantPage = () => import("@/components/pages/ParticipantPage.vue");
|
|
|
24
24
|
const SearchPage = () => import("@/components/pages/SearchPage.vue");
|
|
25
25
|
const CategoryPage = () => import("@/components/pages/CategoryPage.vue");
|
|
26
26
|
const RubriquePage = () => import("@/components/pages/RubriquePage.vue");
|
|
27
|
+
const TagPage = () => import("@/components/pages/TagPage.vue");
|
|
27
28
|
const LivesPage = () => import("@/components/pages/LivesPage.vue");
|
|
28
29
|
const PlaylistPage = () => import("@/components/pages/PlaylistPage.vue");
|
|
29
30
|
const PlaylistsPage = () => import("@/components/pages/PlaylistsPage.vue");
|
|
@@ -206,6 +207,21 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
206
207
|
title: "",
|
|
207
208
|
}
|
|
208
209
|
},
|
|
210
|
+
{
|
|
211
|
+
path: "/main/pub/tag/:tag([^?]*)?:productor?",
|
|
212
|
+
name: "tag",
|
|
213
|
+
component: TagPage,
|
|
214
|
+
props: (route: RouteLocationNormalized) => ({
|
|
215
|
+
pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
|
|
216
|
+
ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
|
|
217
|
+
tag: route.params.tag,
|
|
218
|
+
routeOrga:route.query.o,
|
|
219
|
+
routeQuery: route.query.q ?? "",
|
|
220
|
+
}),
|
|
221
|
+
meta:{
|
|
222
|
+
title: "",
|
|
223
|
+
}
|
|
224
|
+
},
|
|
209
225
|
{
|
|
210
226
|
path: "/main/pub/lives/:productor?",
|
|
211
227
|
name: "lives",
|
|
@@ -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
|
+
}
|
package/src/style/general.scss
CHANGED
|
@@ -210,31 +210,6 @@ main, #app{
|
|
|
210
210
|
.hid{
|
|
211
211
|
display: none !important;
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
/** Comma list style */
|
|
215
|
-
.comma {
|
|
216
|
-
display: flex;
|
|
217
|
-
flex-wrap: wrap;
|
|
218
|
-
align-items: center;
|
|
219
|
-
margin: 0.5rem 0;
|
|
220
|
-
|
|
221
|
-
> a{
|
|
222
|
-
text-transform: capitalize;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
> a, .comma-element {
|
|
226
|
-
&::after {
|
|
227
|
-
content: ", ";
|
|
228
|
-
margin-right: 0.2rem;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
&:last-child {
|
|
232
|
-
&::after {
|
|
233
|
-
content: "";
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
213
|
|
|
239
214
|
/* Line clamp */
|
|
240
215
|
.basic-line-clamp{
|