code7-leia 1.0.10 → 1.0.13
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/dist/index.es.js +3357 -2922
- package/package.json +6 -6
- package/src/components/CustomToast/index.tsx +62 -0
- package/src/components/CustomToast/styles.tsx +74 -0
- package/src/components/EmptyState/index.tsx +88 -0
- package/src/components/EmptyState/styles.tsx +81 -0
- package/src/components/FileArea/components/AreaUpload/index.tsx +137 -0
- package/src/components/FileArea/components/AreaUpload/styles.tsx +86 -0
- package/src/components/FileArea/components/Modal/ModalButtonClose.tsx +23 -0
- package/src/components/FileArea/components/Modal/ModalContent.tsx +26 -0
- package/src/components/FileArea/components/Modal/ModalFooter.tsx +18 -0
- package/src/components/FileArea/components/Modal/ModalHeader.tsx +18 -0
- package/src/components/FileArea/components/Modal/ModalTitle.tsx +18 -0
- package/src/components/FileArea/components/Modal/index.tsx +131 -0
- package/src/components/FileArea/components/Modal/styles.tsx +121 -0
- package/src/components/FileArea/components/Search/index.tsx +45 -0
- package/src/components/FileArea/components/Search/styles.tsx +26 -0
- package/src/components/FileArea/components/Spinner/index.tsx +22 -0
- package/src/components/FileArea/components/Spinner/styles.tsx +59 -0
- package/src/components/FileArea/components/Table/index.tsx +34 -0
- package/src/components/FileArea/components/Table/styles.tsx +60 -0
- package/src/components/FileArea/index.tsx +279 -0
- package/src/components/FileArea/styles.tsx +183 -0
- package/src/components/LengthCounter/index.tsx +29 -0
- package/src/components/LengthCounter/styles.ts +11 -0
- package/src/components/Modal/index.tsx +30 -0
- package/src/components/Modal/styles.ts +52 -0
- package/src/components/MultiSelect/index.tsx +102 -0
- package/src/components/MultiSelect/styles.tsx +85 -0
- package/src/components/PersonasArea/index.tsx +196 -0
- package/src/components/PersonasArea/styles.ts +137 -0
- package/src/components/Select/index.tsx +60 -0
- package/src/components/Select/styles.tsx +49 -0
- package/src/components/TestArea/components/InputTest/index.tsx +23 -0
- package/src/components/TestArea/components/InputTest/styles.tsx +28 -0
- package/src/components/TestArea/components/TextArea/index.tsx +97 -0
- package/src/components/TestArea/components/TextArea/styles.tsx +173 -0
- package/src/components/TestArea/index.tsx +99 -0
- package/src/components/TestArea/styles.tsx +112 -0
- package/src/contexts/LeiaProvider.tsx +133 -0
- package/src/index.tsx +6 -0
- package/src/interface/FileData.ts +11 -0
- package/src/interface/Language.ts +95 -0
- package/src/interface/Table.ts +12 -0
- package/src/service/Api.ts +9 -0
- package/src/service/ApiDev.ts +9 -0
- package/src/service/ApiHml.ts +9 -0
- package/src/store/index.ts +13 -0
- package/src/store/modules/actions.ts +88 -0
- package/src/store/modules/reducer.ts +46 -0
- package/src/store/modules/sagas.ts +127 -0
- package/src/store/modules/types.ts +19 -0
- package/src/types/image.d.ts +4 -0
- package/src/utils/formatAxios.tsx +15 -0
- package/src/utils/getApi.tsx +16 -0
- package/src/utils/getLanguage.tsx +17 -0
- package/src/utils/languages/en.ts +107 -0
- package/src/utils/languages/es.ts +107 -0
- package/src/utils/languages/pt-br.ts +111 -0
- package/src/utils/stringNormalize.ts +9 -0
- package/dist/code7-leia.css +0 -1
- package/dist/index.cjs.js +0 -1072
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import types from './types'
|
|
2
|
+
|
|
3
|
+
export const getFilesAction = (id: string, token: string, env: string) => {
|
|
4
|
+
return {
|
|
5
|
+
type: types.GET_FILES_REQUEST,
|
|
6
|
+
payload: { id, token, env }
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const getFilesActionSuccess = ({ files }: any) => {
|
|
11
|
+
return {
|
|
12
|
+
type: types.GET_FILES_SUCCESS,
|
|
13
|
+
payload: { files }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const deleteFilesAction = (name: string, id: string, language: string, token: string, env: string) => {
|
|
18
|
+
return {
|
|
19
|
+
type: types.DELETE_FILES_REQUEST,
|
|
20
|
+
payload: { name, id, language, token, env }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const deleteFilesActionSuccess = ({ files }: any) => {
|
|
25
|
+
return {
|
|
26
|
+
type: types.DELETE_FILES_SUCCESS,
|
|
27
|
+
payload: { files }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const uploadFilesAction = (file: any, id: string, pressets: string[], language: string, token: string, env: string) => {
|
|
32
|
+
return {
|
|
33
|
+
type: types.UPLOAD_FILES_REQUEST,
|
|
34
|
+
payload: { file, id, pressets, language, token, env }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const uploadFilesActionSuccess = ({ files }: any) => {
|
|
39
|
+
return {
|
|
40
|
+
type: types.UPLOAD_FILES_SUCCESS,
|
|
41
|
+
payload: { files }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const trainingAction = (id: string, pressets: string[], language: string, token: string, env: string) => {
|
|
46
|
+
return {
|
|
47
|
+
type: types.TRAINING_REQUEST,
|
|
48
|
+
payload: { id, pressets, language, token, env }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const testAction = (question: string, prompt:string, profile: string, presset: string, files_directory: string, token: string, env: string) => {
|
|
53
|
+
return {
|
|
54
|
+
type: types.TEST_REQUEST,
|
|
55
|
+
payload: { question, prompt, profile, presset, files_directory, token, env }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const testActionSuccess = ({ message }: any) => {
|
|
60
|
+
return {
|
|
61
|
+
type: types.TEST_SUCCESS,
|
|
62
|
+
payload: { message }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const commonLoadingStart = () => ({
|
|
67
|
+
type: types.LOADING_START,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export const commonLoadingFinish = () => ({
|
|
71
|
+
type: types.LOADING_FINISH,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export const commonChangingStart = () => ({
|
|
75
|
+
type: types.CHANGING_START,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export const commonChangingFinish = () => ({
|
|
79
|
+
type: types.CHANGING_FINISH,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const commonNetworkOnline = () => ({
|
|
83
|
+
type: types.NETWORK_ONLINE,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export const commonNetworkOffline = () => ({
|
|
87
|
+
type: types.NETWORK_OFFLINE,
|
|
88
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { produce } from 'immer';
|
|
2
|
+
import types from './types'
|
|
3
|
+
|
|
4
|
+
const INITIAL_STATE = {
|
|
5
|
+
files: [],
|
|
6
|
+
message: '',
|
|
7
|
+
isloading: false,
|
|
8
|
+
isChanging: false,
|
|
9
|
+
isOffline: true,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function filesReducer(state = INITIAL_STATE, action: any) {
|
|
13
|
+
return produce(state, (draft) => {
|
|
14
|
+
switch (action.type) {
|
|
15
|
+
case types.GET_FILES_SUCCESS:
|
|
16
|
+
draft.files = action.payload.files;
|
|
17
|
+
break;
|
|
18
|
+
case types.DELETE_FILES_SUCCESS:
|
|
19
|
+
draft.files = action.payload.files;
|
|
20
|
+
break;
|
|
21
|
+
case types.TEST_SUCCESS:
|
|
22
|
+
draft.message = action.payload.message;
|
|
23
|
+
break;
|
|
24
|
+
case types.LOADING_START:
|
|
25
|
+
draft.isloading = true;
|
|
26
|
+
break;
|
|
27
|
+
case types.LOADING_FINISH:
|
|
28
|
+
draft.isloading = false;
|
|
29
|
+
break;
|
|
30
|
+
case types.CHANGING_START:
|
|
31
|
+
draft.isChanging = true;
|
|
32
|
+
break;
|
|
33
|
+
case types.CHANGING_FINISH:
|
|
34
|
+
draft.isChanging = false;
|
|
35
|
+
break;
|
|
36
|
+
case types.NETWORK_ONLINE:
|
|
37
|
+
draft.isOffline = false;
|
|
38
|
+
break;
|
|
39
|
+
case types.NETWORK_OFFLINE:
|
|
40
|
+
draft.isOffline = true;
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
return action.payload;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { takeLatest, all, put, call } from 'redux-saga/effects';
|
|
2
|
+
import { getApi } from '../../utils/getApi'
|
|
3
|
+
import Types from './types'
|
|
4
|
+
import { getFilesActionSuccess,
|
|
5
|
+
deleteFilesActionSuccess,
|
|
6
|
+
testActionSuccess,
|
|
7
|
+
uploadFilesActionSuccess,
|
|
8
|
+
commonLoadingStart,
|
|
9
|
+
commonLoadingFinish, } from './actions'
|
|
10
|
+
import { toast } from '../../components/CustomToast'
|
|
11
|
+
import { getLanguage } from '../../utils/getLanguage'
|
|
12
|
+
|
|
13
|
+
export function* getFilesSaga(action: any) {
|
|
14
|
+
try {
|
|
15
|
+
yield put(commonLoadingStart());
|
|
16
|
+
const { id, token, env } = action.payload
|
|
17
|
+
const api = getApi(env)
|
|
18
|
+
const { data } = yield call(api.get, `/training/${id}?token=${token}`);
|
|
19
|
+
yield put(getFilesActionSuccess({ files: data.files}));
|
|
20
|
+
} catch (error) {
|
|
21
|
+
console.log('-----------getFiles.error------------------->', error);
|
|
22
|
+
} finally {
|
|
23
|
+
yield put(commonLoadingFinish());
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function* deleteFilesSaga(action: any) {
|
|
28
|
+
const t = getLanguage(action.payload.language)
|
|
29
|
+
try {
|
|
30
|
+
yield put(commonLoadingStart());
|
|
31
|
+
const { id, name, token, env } = action.payload
|
|
32
|
+
const api = getApi(env)
|
|
33
|
+
yield call(api.delete, `/delete/${id}/${name}?token=${token}`);
|
|
34
|
+
const { data } = yield call(api.get, `/training/${id}?token=${token}`);
|
|
35
|
+
yield put(deleteFilesActionSuccess({ files: data.files, success: true }));
|
|
36
|
+
} catch (error) {
|
|
37
|
+
toast.error({title: t.toast.deleteFile.fail.title, description: t.toast.deleteFile.fail.description});
|
|
38
|
+
console.log('-----------deleteFilesSaga.error------------------->', error);
|
|
39
|
+
} finally {
|
|
40
|
+
yield put(commonLoadingFinish());
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function* testSaga(action: any) {
|
|
45
|
+
try {
|
|
46
|
+
yield put(commonLoadingStart());
|
|
47
|
+
const { question, prompt, profile, presset, files_directory, token, env } = action.payload
|
|
48
|
+
const api = getApi(env)
|
|
49
|
+
const { data } = yield call(api.post, `/ask`, { question, description: prompt, profile, tag: presset, files_directory, token });
|
|
50
|
+
yield put(testActionSuccess({ message: data.message }));
|
|
51
|
+
} catch (error) {
|
|
52
|
+
console.log('-----------testSaga.error------------------->', error);
|
|
53
|
+
} finally {
|
|
54
|
+
yield put(commonLoadingFinish());
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function* uploadFilesSaga(action: any) {
|
|
59
|
+
const t = getLanguage(action.payload.language);
|
|
60
|
+
try {
|
|
61
|
+
yield put(commonLoadingStart());
|
|
62
|
+
const { id, file, pressets, token, env } = action.payload;
|
|
63
|
+
const api = getApi(env)
|
|
64
|
+
const blob = new Blob([file.content]);
|
|
65
|
+
const formData = new FormData();
|
|
66
|
+
const sanitizedPath = file.properties.path.replace(/^\/+|\/+$/g, '');
|
|
67
|
+
formData.append('file', blob, sanitizedPath || 'default_filename');
|
|
68
|
+
|
|
69
|
+
const queryParams = pressets.length
|
|
70
|
+
? new URLSearchParams({ tags: pressets.join(',') }).toString()
|
|
71
|
+
: '';
|
|
72
|
+
|
|
73
|
+
const url = queryParams
|
|
74
|
+
? `/upload/${id}?token=${token}&${queryParams}`
|
|
75
|
+
: `/upload/${id}?token=${token}`;
|
|
76
|
+
|
|
77
|
+
yield call(api.post, url, formData, {
|
|
78
|
+
headers: {
|
|
79
|
+
'Content-Type': 'multipart/form-data',
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const { data } = yield call(api.get, `/training/${id}?token=${token}`);
|
|
84
|
+
yield put(uploadFilesActionSuccess({ files: data.files }));
|
|
85
|
+
} catch (error) {
|
|
86
|
+
toast.error({
|
|
87
|
+
title: t.toast.uploadFile.fail.title,
|
|
88
|
+
description: t.toast.uploadFile.fail.description,
|
|
89
|
+
});
|
|
90
|
+
console.log('-----------uploadFilesSaga.error------------------->', error);
|
|
91
|
+
} finally {
|
|
92
|
+
yield put(commonLoadingFinish());
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
export function* TrainingSaga(action: any) {
|
|
98
|
+
const t = getLanguage(action.payload.language)
|
|
99
|
+
try {
|
|
100
|
+
yield put(commonLoadingStart());
|
|
101
|
+
const { id, pressets, token, env } = action.payload;
|
|
102
|
+
const tag = pressets.join(',');
|
|
103
|
+
const api = getApi(env)
|
|
104
|
+
const queryParams = new URLSearchParams({ tag }).toString();
|
|
105
|
+
|
|
106
|
+
yield call(api.post, pressets.length > 0 ? `/training?${queryParams}` : `/training`,{ files_directory: id, token });
|
|
107
|
+
|
|
108
|
+
const { data } = yield call(api.get, `/training/${id}?token=${token}`);
|
|
109
|
+
yield put(uploadFilesActionSuccess({ files: data.files }));
|
|
110
|
+
toast.success({title: t.toast.Train.success.title, description: t.toast.Train.success.description});
|
|
111
|
+
} catch (error) {
|
|
112
|
+
toast.error({title: t.toast.Train.fail.title, description: t.toast.Train.fail.description});
|
|
113
|
+
console.log('-----------TrainingSaga.error------------------->', error);
|
|
114
|
+
} finally {
|
|
115
|
+
yield put(commonLoadingFinish());
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export default function* filesSagas() {
|
|
120
|
+
yield all([
|
|
121
|
+
takeLatest(Types.GET_FILES_REQUEST, getFilesSaga),
|
|
122
|
+
takeLatest(Types.DELETE_FILES_REQUEST, deleteFilesSaga),
|
|
123
|
+
takeLatest(Types.UPLOAD_FILES_REQUEST, uploadFilesSaga),
|
|
124
|
+
takeLatest(Types.TEST_REQUEST, testSaga),
|
|
125
|
+
takeLatest(Types.TRAINING_REQUEST, TrainingSaga)
|
|
126
|
+
]);
|
|
127
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const Types = {
|
|
2
|
+
GET_FILES_REQUEST: 'GET_FILES_REQUEST',
|
|
3
|
+
GET_FILES_SUCCESS: 'GET_FILES_SUCCESS',
|
|
4
|
+
DELETE_FILES_REQUEST: 'DELETE_FILES_REQUEST',
|
|
5
|
+
DELETE_FILES_SUCCESS: 'DELETE_FILES_SUCCESS',
|
|
6
|
+
UPLOAD_FILES_REQUEST: 'UPLOAD_FILES_REQUEST',
|
|
7
|
+
UPLOAD_FILES_SUCCESS: 'UPLOAD_FILES_SUCCESS',
|
|
8
|
+
TRAINING_REQUEST: 'TRAINING_REQUEST',
|
|
9
|
+
TEST_REQUEST: 'TEST_REQUEST',
|
|
10
|
+
TEST_SUCCESS: 'TEST_SUCCESS',
|
|
11
|
+
LOADING_START: 'LOADING_START',
|
|
12
|
+
LOADING_FINISH: 'LOADING_FINISH',
|
|
13
|
+
CHANGING_START: 'CHANGING_START',
|
|
14
|
+
CHANGING_FINISH: 'CHANGING_FINISH',
|
|
15
|
+
NETWORK_ONLINE: 'NETWORK_ONLINE',
|
|
16
|
+
NETWORK_OFFLINE: 'NETWORK_OFFLINE',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default Types;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import axios from 'axios'
|
|
2
|
+
|
|
3
|
+
type HttpServerMethod = 'get' | 'post' | 'delete' | 'put' | 'patch' | 'options'
|
|
4
|
+
|
|
5
|
+
export async function formatAxios(method: HttpServerMethod, url: string, hasBody:boolean, body:any): Promise<any> {
|
|
6
|
+
if(hasBody){
|
|
7
|
+
const { data } = method !== 'delete' ? await axios[method](url, body) : await axios[method](url, body)
|
|
8
|
+
|
|
9
|
+
return data
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { data } = await axios[method](url)
|
|
13
|
+
|
|
14
|
+
return data
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import api from '../service/Api'
|
|
2
|
+
import apiHml from '../service/ApiHml'
|
|
3
|
+
import apiDev from '../service/ApiDev'
|
|
4
|
+
|
|
5
|
+
export const getApi = (env: string) => {
|
|
6
|
+
switch (env.toLowerCase()) {
|
|
7
|
+
case 'dev':
|
|
8
|
+
return apiDev;
|
|
9
|
+
case 'prod':
|
|
10
|
+
return api;
|
|
11
|
+
case 'test':
|
|
12
|
+
return apiHml;
|
|
13
|
+
default:
|
|
14
|
+
return api;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Language } from '../interface/Language';
|
|
2
|
+
import { enTranslation } from './languages/en';
|
|
3
|
+
import { ptTranslation } from './languages/pt-br';
|
|
4
|
+
import { esTranslation } from './languages/es';
|
|
5
|
+
|
|
6
|
+
export const getLanguage = (language: keyof Record<'en' | 'pt-br' | 'es', Language>): Language => {
|
|
7
|
+
switch (language) {
|
|
8
|
+
case 'en':
|
|
9
|
+
return enTranslation;
|
|
10
|
+
case 'pt-br':
|
|
11
|
+
return ptTranslation;
|
|
12
|
+
case 'es':
|
|
13
|
+
return esTranslation;
|
|
14
|
+
default:
|
|
15
|
+
return enTranslation;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Language } from "../../interface/Language";
|
|
2
|
+
|
|
3
|
+
export const enTranslation: Language = {
|
|
4
|
+
files: 'Files',
|
|
5
|
+
test: 'Test',
|
|
6
|
+
|
|
7
|
+
search: 'Search',
|
|
8
|
+
edit: 'Edit',
|
|
9
|
+
clone: 'Clone',
|
|
10
|
+
save: 'Save',
|
|
11
|
+
copyPrefix: 'Copy',
|
|
12
|
+
|
|
13
|
+
personas: {
|
|
14
|
+
title: 'Personas',
|
|
15
|
+
description: 'Add custom prompts for specific assistant behaviors',
|
|
16
|
+
add: 'Add persona',
|
|
17
|
+
modalTitle: 'Persona',
|
|
18
|
+
modalAlert: 'Are you sure you want to delete',
|
|
19
|
+
|
|
20
|
+
fields: {
|
|
21
|
+
name: 'Name',
|
|
22
|
+
description: 'Description',
|
|
23
|
+
prompt: 'Prompt',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
fileArea: {
|
|
27
|
+
description: 'Manage your files with ease! Add new ones and delete old ones as desired.',
|
|
28
|
+
fileName: 'File name',
|
|
29
|
+
status: 'Status',
|
|
30
|
+
presset: 'Presset',
|
|
31
|
+
actions: 'Actions',
|
|
32
|
+
search: 'Search',
|
|
33
|
+
fileUpload: 'File upload',
|
|
34
|
+
training: 'Train preset',
|
|
35
|
+
emptyState: {
|
|
36
|
+
title: 'No data',
|
|
37
|
+
description: 'No files uploaded yet. Start by adding your documents now!',
|
|
38
|
+
},
|
|
39
|
+
modal: {
|
|
40
|
+
descriptionUpload: 'Drag and drop files here or',
|
|
41
|
+
chooseFile: 'Choose a file',
|
|
42
|
+
uploadFile: 'Upload a file',
|
|
43
|
+
deleteFileTitle: 'Delete a file',
|
|
44
|
+
deleteFile: 'Important! By deleting this file, you will lose all its information and will not be able to recover it.',
|
|
45
|
+
trainingTitle: 'Presset Training',
|
|
46
|
+
trainingDescription: 'Select one or more pressets to be trained. Note: If none are selected, Lira will train all pressets.'
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
buttons: {
|
|
50
|
+
cancel: 'Cancel',
|
|
51
|
+
send: 'Send',
|
|
52
|
+
delete: 'Delete',
|
|
53
|
+
test: 'Test',
|
|
54
|
+
addNewPresset: 'Add new presset',
|
|
55
|
+
addPresset: 'Add presset',
|
|
56
|
+
training: 'Training'
|
|
57
|
+
},
|
|
58
|
+
testArea: {
|
|
59
|
+
description: 'Type a sentence to test artificial intelligence',
|
|
60
|
+
typeSentence: 'Type a sentence',
|
|
61
|
+
typePrompt: 'Insert a custom prompt here',
|
|
62
|
+
selectPersona: 'Select a Persona',
|
|
63
|
+
selectPresset: 'Select a presset',
|
|
64
|
+
emptyState: {
|
|
65
|
+
title: 'No data for analysis',
|
|
66
|
+
description: 'Do a search, click the "Test" button.',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
toast: {
|
|
70
|
+
deleteFile: {
|
|
71
|
+
success: {
|
|
72
|
+
title: 'Success',
|
|
73
|
+
description: 'File deleted successfully!'
|
|
74
|
+
},
|
|
75
|
+
fail: {
|
|
76
|
+
title: 'Failure',
|
|
77
|
+
description: 'Error deleting the file!'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
uploadFile: {
|
|
81
|
+
success: {
|
|
82
|
+
title: 'Success',
|
|
83
|
+
description: 'File uploaded successfully!'
|
|
84
|
+
},
|
|
85
|
+
fail: {
|
|
86
|
+
title: 'Failure',
|
|
87
|
+
description: 'Error uploading the file!'
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
Test: {
|
|
91
|
+
fail: {
|
|
92
|
+
title: 'Failure',
|
|
93
|
+
description: 'Error testing Lira'
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
Train: {
|
|
97
|
+
fail: {
|
|
98
|
+
title: 'Failure',
|
|
99
|
+
description: 'Error training Lira'
|
|
100
|
+
},
|
|
101
|
+
success: {
|
|
102
|
+
title: 'Success',
|
|
103
|
+
description: 'Lira is in the training process!'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Language } from "../../interface/Language";
|
|
2
|
+
|
|
3
|
+
export const esTranslation: Language = {
|
|
4
|
+
files: 'Archivos',
|
|
5
|
+
test: 'Prueba',
|
|
6
|
+
|
|
7
|
+
search: 'Buscar',
|
|
8
|
+
edit: 'Editar',
|
|
9
|
+
clone: 'Clonar',
|
|
10
|
+
save: 'Guardar',
|
|
11
|
+
copyPrefix: 'Copia',
|
|
12
|
+
|
|
13
|
+
personas: {
|
|
14
|
+
title: 'Personas',
|
|
15
|
+
description: 'Agrega prompts personalizados para comportamientos específicos del asistente',
|
|
16
|
+
add: 'Agregar persona',
|
|
17
|
+
modalTitle: 'Persona',
|
|
18
|
+
modalAlert: '¿Seguro que deseas eliminar',
|
|
19
|
+
|
|
20
|
+
fields: {
|
|
21
|
+
name: 'Nombre',
|
|
22
|
+
description: 'Descripción',
|
|
23
|
+
prompt: 'Prompt',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
fileArea: {
|
|
27
|
+
description: '¡Administre sus archivos fácilmente! Agregue nuevos y elimine los antiguos según desee.',
|
|
28
|
+
fileName: 'Nombre del archivo',
|
|
29
|
+
status: 'Status',
|
|
30
|
+
presset: 'Preconfiguración',
|
|
31
|
+
actions: 'Acciones',
|
|
32
|
+
search: 'Buscar',
|
|
33
|
+
fileUpload: 'Subir archivo',
|
|
34
|
+
training: 'Entrenar preconfiguración',
|
|
35
|
+
emptyState: {
|
|
36
|
+
title: 'Sin datos',
|
|
37
|
+
description: 'Aún no se han subido archivos. ¡Comience agregando sus documentos ahora!',
|
|
38
|
+
},
|
|
39
|
+
modal: {
|
|
40
|
+
descriptionUpload: 'Arrastre y suelte los archivos aquí o',
|
|
41
|
+
chooseFile: 'Elegir un archivo',
|
|
42
|
+
uploadFile: 'Subir un archivo',
|
|
43
|
+
deleteFileTitle: 'Eliminar un archivo',
|
|
44
|
+
deleteFile: '¡Importante! Al eliminar este archivo, perderá toda su información y no podrá recuperarla.',
|
|
45
|
+
trainingTitle: 'Entrenamiento de preconfiguración',
|
|
46
|
+
trainingDescription: 'Seleccione una o más preconfiguracións para ser entrenadas. Nota: Si no se selecciona ninguna, Lira entrenará todas las preconfiguracións.'
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
buttons: {
|
|
50
|
+
cancel: 'Cancelar',
|
|
51
|
+
send: 'Enviar',
|
|
52
|
+
delete: 'Eliminar',
|
|
53
|
+
test: 'Prueba',
|
|
54
|
+
addNewPresset: 'Agregar nueva preconfiguración',
|
|
55
|
+
addPresset: 'Agregar preconfiguración',
|
|
56
|
+
training: 'Capacitación'
|
|
57
|
+
},
|
|
58
|
+
testArea: {
|
|
59
|
+
description: 'Escribe una frase para probar la inteligencia artificial.',
|
|
60
|
+
typeSentence: 'Escribe una oración',
|
|
61
|
+
typePrompt: 'Inserte un prompt personalizado aquí',
|
|
62
|
+
selectPersona: 'Seleccionar una Persona',
|
|
63
|
+
selectPresset: 'Seleccionar una preconfiguración',
|
|
64
|
+
emptyState: {
|
|
65
|
+
title: 'Sin datos para el análisis',
|
|
66
|
+
description: 'Realice una búsqueda, haga clic en el botón "Prueba".',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
toast: {
|
|
70
|
+
deleteFile: {
|
|
71
|
+
success: {
|
|
72
|
+
title: 'Éxito',
|
|
73
|
+
description: '¡Archivo eliminado correctamente!'
|
|
74
|
+
},
|
|
75
|
+
fail: {
|
|
76
|
+
title: 'Error',
|
|
77
|
+
description: 'Error al eliminar el archivo!'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
uploadFile: {
|
|
81
|
+
success: {
|
|
82
|
+
title: 'Éxito',
|
|
83
|
+
description: '¡Archivo subido correctamente!'
|
|
84
|
+
},
|
|
85
|
+
fail: {
|
|
86
|
+
title: 'Error',
|
|
87
|
+
description: 'Error al subir el archivo!'
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
Test: {
|
|
91
|
+
fail: {
|
|
92
|
+
title: 'Error',
|
|
93
|
+
description: 'Error al probar Lira'
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
Train: {
|
|
97
|
+
fail: {
|
|
98
|
+
title: 'Error',
|
|
99
|
+
description: 'Error al entrenar Lira'
|
|
100
|
+
},
|
|
101
|
+
success: {
|
|
102
|
+
title: 'Éxito',
|
|
103
|
+
description: '¡Lira está en proceso de entrenamiento!'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Language } from "../../interface/Language";
|
|
2
|
+
|
|
3
|
+
export const ptTranslation: Language = {
|
|
4
|
+
files: 'Arquivos',
|
|
5
|
+
test: 'Teste',
|
|
6
|
+
|
|
7
|
+
search: 'Pesquisar',
|
|
8
|
+
edit: 'Editar',
|
|
9
|
+
clone: 'Clonar',
|
|
10
|
+
save: 'Salvar',
|
|
11
|
+
copyPrefix: 'Cópia',
|
|
12
|
+
|
|
13
|
+
personas: {
|
|
14
|
+
title: 'Personas',
|
|
15
|
+
description: 'Adicione prompts personalizados para comportamentos específicos do assistente',
|
|
16
|
+
add: 'Adicionar persona',
|
|
17
|
+
modalTitle: 'Persona',
|
|
18
|
+
modalAlert: 'Quer mesmo deletar',
|
|
19
|
+
|
|
20
|
+
fields: {
|
|
21
|
+
name: 'Nome',
|
|
22
|
+
description: 'Descrição',
|
|
23
|
+
prompt: 'Prompt',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
fileArea: {
|
|
28
|
+
description: 'Gerencie seus arquivos com facilidade! Adicione novos e exclua os antigos conforme desejar.',
|
|
29
|
+
fileName: 'Nome do arquivo',
|
|
30
|
+
status: 'Status',
|
|
31
|
+
presset: 'Predefinição',
|
|
32
|
+
actions: 'Ações',
|
|
33
|
+
search: 'Pesquisar',
|
|
34
|
+
fileUpload: 'Enviar arquivo',
|
|
35
|
+
training: 'Treinar predefinição',
|
|
36
|
+
emptyState: {
|
|
37
|
+
title: 'Sem dados',
|
|
38
|
+
description: 'Nenhum arquivo enviado ainda. Comece adicionando seus documentos agora!',
|
|
39
|
+
},
|
|
40
|
+
modal: {
|
|
41
|
+
descriptionUpload: 'Arraste e solte os arquivos aqui ou',
|
|
42
|
+
chooseFile: 'Escolha um arquivo',
|
|
43
|
+
uploadFile: 'Enviar um arquivo',
|
|
44
|
+
deleteFileTitle: 'Excluir um arquivo',
|
|
45
|
+
deleteFile: 'Importante! Ao excluir este arquivo, você perderá todas as suas informações e não poderá recuperá-las.',
|
|
46
|
+
trainingTitle: 'Treinamento de predefinição',
|
|
47
|
+
trainingDescription: 'Selecione um ou mais predefinições para serem treinadas. Obs: Caso não selecionada nenhuma a Lira irá treinar todas as predefinições'
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
buttons: {
|
|
52
|
+
cancel: 'Cancelar',
|
|
53
|
+
send: 'Enviar',
|
|
54
|
+
delete: 'Excluir',
|
|
55
|
+
test: 'Teste',
|
|
56
|
+
addNewPresset: 'Adicionar nova predefinição',
|
|
57
|
+
addPresset: 'Adicionar predefinição',
|
|
58
|
+
training: 'Treinamento'
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
testArea: {
|
|
62
|
+
description: 'Digite uma frase para testar a inteligência artificial.',
|
|
63
|
+
typeSentence: 'Digite uma frase',
|
|
64
|
+
typePrompt: 'Insira aqui um prompt personalizado',
|
|
65
|
+
selectPersona: 'Selecione uma Persona',
|
|
66
|
+
selectPresset: 'Selecione uma predefinição',
|
|
67
|
+
emptyState: {
|
|
68
|
+
title: 'Sem dados para análise',
|
|
69
|
+
description: 'Faça uma pesquisa, clique no botão \"Teste\".',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
toast: {
|
|
74
|
+
deleteFile: {
|
|
75
|
+
success: {
|
|
76
|
+
title: 'Sucesso',
|
|
77
|
+
description: 'Arquivo excluído com sucesso!'
|
|
78
|
+
},
|
|
79
|
+
fail: {
|
|
80
|
+
title: 'Falha',
|
|
81
|
+
description: 'Erro ao excluir o arquivo!'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
uploadFile: {
|
|
85
|
+
success: {
|
|
86
|
+
title: 'Sucesso',
|
|
87
|
+
description: 'Arquivo enviado com sucesso!'
|
|
88
|
+
},
|
|
89
|
+
fail: {
|
|
90
|
+
title: 'Falha',
|
|
91
|
+
description: 'Erro ao enviar o arquivo!'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
Test: {
|
|
95
|
+
fail: {
|
|
96
|
+
title: 'Falha',
|
|
97
|
+
description: 'Erro ao testar Lira'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
Train: {
|
|
101
|
+
fail: {
|
|
102
|
+
title: 'Falha',
|
|
103
|
+
description: 'Erro ao treinar a Lira'
|
|
104
|
+
},
|
|
105
|
+
success: {
|
|
106
|
+
title: 'Sucesso',
|
|
107
|
+
description: 'A Lira está em processo de treinamento!'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|