Risuai 0.6.3 first commit

This commit is contained in:
kwaroran
2023-05-07 12:41:45 +09:00
parent 50e5e1d917
commit 2c5c7d2694
98 changed files with 15070 additions and 0 deletions

204
src/lang/en.ts Normal file
View File

@@ -0,0 +1,204 @@
export const languageEnglish = {
formating:{
'main': "Main Prompt",
'jailbreak': "Jailbreak Prompt",
'chats': "Past Chats",
'lorebook': "Lorebook",
'globalNote': "Global Note",
'authorNote': "Author's Note",
'lastChat': "Last Chat",
"description": "Character Description"
},
errors:{
toomuchtoken: 'Error: The minimum required token is greater than the Max Context Size.',
unknownModel: 'Error: Unknown model selected',
httpError: 'Error: error in request:',
noData: 'There is no data in file, or the file is corrupted',
onlyOneChat: 'There must be least one chat',
alreadyCharInGroup: "There is already a character with the same name in the group."
},
help:{
model: "Model option is a main model used in chat.",
submodel: "Auxiliary Model is a model that used in analizing emotion images and etc. gpt3.5 is recommended.",
oaiapikey: 'Api key for OpenAI. you can get it in https://platform.openai.com/account/api-keys',
mainprompt: 'The main prompt option sets the default model behavior.',
jailbreak: 'The NSFW/jailbreak prompt option activates when NSFW/jailbreak toggle is on in character.',
globalNote: 'a note that strongly effects model behavior, also known as UJB. works in all characters.',
formatOrder: "formating order of prompt. lower blocks does more effect to the model.",
forceUrl: "if it is not blank, the request will go to the url that you had inputed.",
tempature:"lower values make character follow prompts closely, but it will more likely to response like a machine.\nHigher values will result in creative behavior, but the character's response can break down more easily.",
frequencyPenalty: "Higher values prevent the use of duplicate words in response, but character's response can break down more easily.",
presensePenalty: "Higher values prevent the use of duplicate words in all context, but character's response can break down more easily.",
sdProvider: "provider for image generation.",
msgSound: "Plays *ding* sound when character responses",
charDesc: "Brief description of the character. this effects characters response.",
charFirstMessage: "First message of the character. this highly effects characters response.",
charNote: "a note that strongly effects model behavior. works in current chat. also known as memory.",
toggleNsfw: "toggles NSFW/jailbreak prompt on and off.",
lorebook: "Lorebook is a user-made dictionary for AI. AI only sees it when where is an activation keys in the context.",
loreName: "name of the lore. it dosen't effects the Ai.",
loreActivationKey: "If one of the activation key exists in context, the lore will be activated and prompt will go in. seperated by commas.",
loreorder: "If insert Order is higher, it will effect the model more, and it will more lessly cuted when activated lore are many.",
bias:"bias is a key-value data which modifies the likelihood of string appearing.\nit can be -100 to 100, higher values will be more likely to appear, and lower values will be more unlikely to appear \nWarning: if the tokenizer is wrong, it not work properly.",
emotion: "Emotion Images option shows image depending at character's emotion which is analized by character's response. you must input emotion name as words *(like joy, happy, fear and etc.)* .emotion named **netural** will be default emotion if it exists. must be more then 3 images to work properly.",
imggen: "Image Generation option generates and shows image from external program. the image is generated by image prompt, which is made by analizing current chat. \n\n image generation is analized based on key-value arguments, which are configarable in below."
+ "\n\n**'always'** key applys always, and dosen't changes. **'negative'** key applys always in negative value for image generation."
+ "\n\nobjects with other key's value will change according to the key's name as the chat progresses."
+ "\n\nIf a key has a special character in front of its name, it has a special effect."
+ "\n- if the key starts with **|**, the key's value will not change."
+ "\n- if the key starts with **$**, the key's value will more likely to change."
+ "\n\nwhen the image is first generated, you can only change it by modifying 'Current Image Generation Data' in below.",
experimental: "This is a experimental setting. it might be unstable."
},
setup: {
chooseProvider: "Choose AI Provider",
openaikey: "OpenAI with API Key (Recommended)",
openaiProxy: "OpenAI Reverse proxy",
setupmodelself: "Others / I will setup myself",
inputApiKey: "Input API Key Here",
apiKeyhelp: "You can get api key from: ",
setupSelfHelp: "Setup yourself in settings, after Welcome screen ends.",
theme: "Select your theme",
texttheme: "Select your text color",
inputName: "Lastly, Input your Nickname."
},
confirm: "Confirm",
goback: "Go Back",
botSettings:'Bot Settings',
model: "Model",
apiKey: 'API Key',
providerURL: 'Request URL',
providerJSON: 'Request Body JSON',
mainPrompt: "Main Prompt",
jailbreakPrompt: "NSFW/Jailbreak Prompt",
globalNote: "Global Note",
tokens: 'Tokens',
maxContextSize: 'Max Context Size',
maxResponseSize: 'Max Response Size',
temperature: 'Temperature',
frequencyPenalty: 'Frequency Penalty',
presensePenalty: 'Presense Penalty',
advancedSettings: 'Advanced Settings',
advancedSettingsWarn: "Warn: If you don't know what the option does, don't change it!",
formatingOrder: "Formating Order",
authorNote: "Author's Note",
firstMessage: 'First Message',
description: 'Description',
jailbreakToggle: 'Toggle NSFW/Jailbreak',
charIcon: "Character Icon",
characterDisplay: "Character Display",
viewScreen: 'Additional Character Screen',
none: "None",
emotionImage: "Emotion Images",
noImages: "No Images",
noBias: "No Bias",
image: 'Image',
name: 'Name',
emotion: "Emotion Name",
value: "Value",
reroll: 'Regenerate',
chatList: 'Chat List',
removeChat: "Remove this message?",
loreBook: 'Lorebook',
character: "Character",
Chat: "Chat",
globalLoreInfo: "Character Lorebook applys to all chats in the character.",
group: "Group",
groupLoreInfo: "Group Lorebook applys to all chats in the group.",
localLoreInfo: "Chat Lorebook only applies to the current chat.",
removeConfirm: "Do you really want to remove: ",
removeConfirm2: "Do you REALLY want to remove: ",
exportConfirm: "Do you want to export this?",
insertOrder: 'Insertion Order',
activationKeys: 'Activation keys',
activationKeysInfo: 'Comma seperated',
prompt: 'Prompt',
loreBookDepth: "Lorebook Search Depth",
loreBookToken: "Lorebook Max Tokens",
removeCharacter: "Remove Character",
removeGroup: "Remove Group",
exportCharacter: "Export Character",
userSetting: "User Settings",
username:'Your Name',
userIcon: "Your Icon",
successExport: "Successfuly exported and downloaded to your download directory",
successImport: "Successfuly imported",
importedCharacter: 'Imported Character',
alwaysActive: "Always Active",
additionalPrompt: "Additional Prompt",
descriptionPrefix: "Description Prefix",
forceReplaceUrl: "Reverse Proxy",
emotionWarn: "Auxiliary model is used.",
plugin: "Plugin",
language: "Language",
UiLanguage: "UI Language",
createfromScratch: "Create from Scratch",
importCharacter: 'Import Character',
translator: "Translator",
disabled: "Disabled",
noPluginSelected: "Model selected as plugin, but no plugin selected.",
text: "Text",
UISize: "Chat Text Size",
newVersion: "Update found, do you want to install?",
display: "Display & Audio",
useCustomBackground: "Custom Background",
translateInput: "Translate Input",
autoTranslation: "Auto Translation",
fullscreen: "Fullscreen",
playMessage:"Play Message Audio",
iconSize: "Icon Size",
createGroup: "Create Group Chat",
groupIcon: "Group Icon",
single: "Single",
multiple: "Multiple",
useCharLorebook: "Use Lores in Characters",
selectChar: "Select Character",
askLoadFirstMsg: "Shall we load the first message?",
theme: "Theme",
editOrder: "Edit Order",
autoMode: "Auto Mode",
submodel: "Auxiliary Model",
timeOutinSec: "Timeout (in seconds)",
emotionPrompt: "Emotion Prompt",
singleView: "Single View",
SpacedView: "Multiple Character View",
emphasizedView: "Double Character View",
pluginWarn: "Plugins run in an isolated environment, but installing malicious plugins can cause problems.",
createGroupImg: "Generate group icon",
waifuWidth: "Waifu Chat Width",
savebackup: "Save Backup to google",
loadbackup: "Load Backup from google",
files: "Files",
backupConfirm: "Do you really want to save backup?",
backupLoadConfirm: "Do you really want to load backup? All datas will be lost!",
backupLoadConfirm2: "Do you really, really want to load backup? All datas will be lost!",
pasteAuthCode: "Please copy the auth code from popup and paste it in here:",
others: "Others",
presets: "Presets",
imageGeneration: "Image Generation",
provider: "Provider",
key: "key",
noData: "No Data",
currentImageGeneration: "Current Image Generation Data",
promptPreprocess: "Use Prompt Preprocess",
SwipeRegenerate: "Use Swipe for Regeneration",
instantRemove: "Remove subsequent when message remove",
instantRemoveConfirm: "Do you want to remove just one message? If you select No, then the message after it will also be remove.",
textColor: "Text Color",
classicRisu: "Classic Risu",
highcontrast: "High-Contrast",
quickPreset: "You can quickly change preset by Ctrl + (Index of Preset)",
requestretrys:"Request Retrys when Fail",
utilityBot: "Utility Bot",
ShowLog: "Show Request Logs",
waifuWidth2: "Waifu Character Size",
sayNothing:"Input 'say nothing' when no string inputed",
regexScript: "Regex Script",
type: "Type",
editInput: "Modfiy Input",
editOutput: "Modfiy Output",
editProcess: "Modfiy Request Data"
}

15
src/lang/index.ts Normal file
View File

@@ -0,0 +1,15 @@
import { cloneDeep, merge } from "lodash";
import { languageEnglish } from "./en";
import { languageKorean } from "./ko";
export let language:typeof languageEnglish = languageEnglish
export function changeLanguage(lang:string){
if(lang === 'ko'){
language = merge(cloneDeep(languageEnglish), languageKorean)
}
else{
language = languageEnglish
}
}

203
src/lang/ko.ts Normal file
View File

@@ -0,0 +1,203 @@
export const languageKorean = {
formating:{
'main': "메인 프롬프트",
'jailbreak': "탈옥 프롬프트",
'chats': "과거 채팅",
'lorebook': "로어북",
'globalNote': "글로벌 노트",
'authorNote': "작가의 노트",
'lastChat': "마지막 채팅",
"description": "캐릭터 설명"
},
errors:{
toomuchtoken: '에러: 요청에 필요한 최소 토큰이 최대 토큰보다 큽니다.',
unknownModel: '에러: 알수없는 모델 선택됨',
httpError: '요청 에러:',
noData: '파일에 데이터가 없거나 데이터가 손상됨',
onlyOneChat: '채팅이 하나 이상 필요합니다',
alreadyCharInGroup: "이미 같은 캐릭터가 그룹에 존재합니다."
},
botSettings:'봇 설정',
model: "모델",
apiKey: 'API 키',
providerURL: '요청 URL',
providerJSON: '요청 JSON',
mainPrompt: "메인 프롬프트",
jailbreakPrompt: "탈옥 프롬프트",
globalNote: "글로벌 노트",
tokens: '토큰',
maxContextSize: '최대 콘텍스트 크기',
maxResponseSize: '최대 응답 크기',
temperature: '온도',
frequencyPenalty: '빈도 패널티',
presensePenalty: '프리센스 패널티',
advancedSettings: '고급 설정',
advancedSettingsWarn: "어떤 설정인지 모르겠으면, 만지지 마세요!",
formatingOrder: "포맷 순서",
authorNote: "작가의 노트",
firstMessage: '첫 메시지',
description: '설명',
jailbreakToggle: 'NSFW/탈옥 토글',
charIcon: "캐릭터 아이콘",
characterDisplay: "캐릭터 디스플레이",
viewScreen: '추가적 캐릭터 스크린',
none: "없음",
emotionImage: "감정 이미지",
noImages: "이미지 없음",
noBias: "Bias 없음",
image: '이미지',
name: '이름',
emotion: "감정 이름",
value: "값",
reroll: '재생성',
chatList: '채팅 리스트',
removeChat: "이 메시지를 삭제하시겠습니까?",
loreBook: '로어북',
character: "캐릭터",
Chat: "챗",
globalLoreInfo: "캐릭터 로어북은 이 캐릭터의 모든 채팅에 적용됩니다.",
localLoreInfo: "챗 로어북은 이 채팅에만 적용됩니다.",
group: "그룹",
groupLoreInfo: "그룹 로어북은 이 그룹의 모든 채팅에 적용됩니다.",
removeConfirm: "정말로 삭제하시겠습니까: ",
removeConfirm2: "정말로, 정말로 삭제하시겠습니까: ",
exportConfirm: "추출하시겠습니까?",
insertOrder: '배치 순서',
activationKeys: '활성화 키',
activationKeysInfo: '","로 나눠주세요',
prompt: '프롬프트',
loreBookDepth: "로어북 검색 깊이",
loreBookToken: "로어북 최대 토큰",
removeCharacter: "캐릭터 삭제",
exportCharacter: "캐릭터 추출",
userSetting: "유저 설정",
username:'유저 이름',
userIcon: "유저 아이콘",
successExport: "성공적으로 추출하여 다운로드 경로에 다운로드했습니다.",
successImport: "성공적으로 임포트했습니다.",
importedCharacter: '성공적으로 임포트 됨.',
alwaysActive: "언제나 활성화",
additionalPrompt: "추가 프롬프트",
descriptionPrefix: "캐릭터 설명 Prefix",
forceReplaceUrl: "리버스 프록시",
emotionWarn: "채팅 분석에는 보조 모델을 사용합니다.",
plugin: "플러그인",
language: "언어",
UiLanguage: "UI Language",
createfromScratch: "새 캐릭터 생성",
importCharacter: '캐릭터 임포트',
translator: "번역기",
disabled: "비활성화됨",
noPluginSelected: "Model selected as plugin, but no plugin selected.",
text: "텍스트",
UISize: "채팅 텍스트 크기",
newVersion: "업데이트가 발견되었습니다. 설치하시겠습니까?",
display: "소리 및 디스플레이",
useCustomBackground: "커스텀 배경",
translateInput: "입력창 번역하기",
autoTranslation: "자동 번역",
fullscreen: "전체 화면",
playMessage:"메시지 소리 출력",
iconSize: "아이콘 크기",
createGroup: "그룹 챗 만들기",
removeGroup: "그룹 삭제",
groupIcon: "그룹 아이콘",
single: "싱글",
multiple: "멀티플",
useCharLorebook: "캐릭터에 있는 로어 사용",
selectChar: "캐릭터 선택",
askLoadFirstMsg: "첫 메세지를 불러올까요?",
theme: "테마",
editOrder: "캐릭터 순서 변경",
autoMode: "오토 모드",
submodel: "보조 모델",
timeOutinSec: "타임아웃 (초)",
emotionPrompt: "감정 프롬프트",
singleView: "싱글",
SpacedView: "멀티플",
emphasizedView: "더블",
pluginWarn: "플러그인은 기본적으로 분리된 환경에서 실행되지만, 악성 플러그인 설치 시 문제가 생길 수 있습니다.",
createGroupImg: "그룹 아이콘 자동생성",
waifuWidth: "Waifu 채팅창 넓이",
savebackup: "구글 백업 저장",
loadbackup: "구글 백업 불러오기",
files: "파일",
backupConfirm: "정말로 백업을 저장하시겠습니까?",
backupLoadConfirm: "정말로 백업을 불러오시겠습니까? 현재 데이터가 모두 사라집니다!",
backupLoadConfirm2: "정말로, 정말로 백업을 불러오시겠습니까? 현재 데이터가 모두 사라집니다!",
pasteAuthCode: "팝업에서 Auth Code를 복사하여 붙여넣기 해 주세요:",
others: "기타",
presets: "프리셋",
imageGeneration: "이미지 생성",
provider: "공급자",
key: "키",
noData: "데이터 없음",
currentImageGeneration: "현재 이미지 생성 데이터",
promptPreprocess: "프롬프트 선보정 사용",
SwipeRegenerate: "스와이프 리롤 사용",
instantRemove: "삭제 시 그 이후 채팅 삭제",
instantRemoveConfirm: "메시지 한개만 삭제하시겠습니까? No를 선택할 시, 그 이후 메시지또한 삭제됩니다.",
textColor: "텍스트 색상",
classicRisu: "클래식 Risu",
highcontrast: "고대비",
quickPreset: "Ctrl + (프리셋 번호)로 프리셋을 빠르게 변경할 수 있습니다",
requestretrys:"실패 시 재요청 횟수",
utilityBot: "유틸리티 봇",
ShowLog: "리퀘스트 로그 보기",
waifuWidth2: "Waifu 캐릭터 크기",
sayNothing:"어떤 문자열도 입력되지 않을 시 'say nothing' 입력",
help:{
model: "채팅에서 사용되는 모델입니다.",
submodel: "보조 모델은 감정 이미지등을 분석하는 데 사용되는 모델입니다. gpt3.5가 권장됩니다.",
oaiapikey: 'OpenAI용 API 키입니다. https://platform.openai.com/account/api-keys에서 구하실 수 있습니다.',
mainprompt: '모델의 기본적인 방향성을 정하는 프롬프트입니다.',
jailbreak: 'NSFW/jailbreak 프롬프트는 NSFW/jailbreak 토글이 켜져있을 때 작동되는 프롬프트입니다.',
globalNote: '모델에 강력한 영향을 주는 프롬프트입니다. UJB라고도 합니다.',
formatOrder: "프롬프트의 배치 순서입니다. 아래쪽에 있을 수록 더 큰 영향을 줍니다.",
forceUrl: "공백이 아닐 경우. 리퀘스트가 다음 URL로 갑니다.",
tempature:"값이 낮을수록 캐릭터가 프롬프트를 잘 따르지만 기계처럼 반응할 가능성이 높아집니다.\n값이 높을수록 창의적인 동작이 가능하지만 캐릭터의 반응이 이상해질 수 있습니다.",
frequencyPenalty: "값이 높을수록 응답 내에서 대사가 반복되는 걸 줄여주지만, 값이 높으면 캐릭터의 반응이 이상해질 수 있습니다.",
presensePenalty: "값이 높을수록 전체 콘텍스트 내에서 대사가 반복되는 걸 줄여주지만, 값이 높으면 캐릭터의 반응이 이상해질 수 있습니다.",
sdProvider: "이미지 생성의 제공자 옵션입니다.",
msgSound: "메세지를 받았을때 *띵* 소리가 납니다.",
charDesc: "캐릭터의 설명입니다.",
charFirstMessage: "캐릭터의 첫 대사입니다.",
charNote: "모델에 강력한 영향을 주는 프롬프트입니다. 이 채팅에서만 적용되며, 메모리라고도 알려져 있습니다.",
toggleNsfw: "NSFW/jailbreak 프롬프트를 끄거나 켭니다.",
lorebook: " AI를 위해 사용자가 만든 사전입니다. AI는 컨텍스트에서 활성화 키가 어디에 있을 때만 이를 인식합니다.",
loreName: "로어의 이름입니다. AI에 영향을 주지 않습니다.",
loreActivationKey: "활성화 키 중 하나가 컨텍스트에 존재하면 해당 로어가 활성화됩니다. 쉼표로 구분된 활성화를 구분하세요.",
loreorder: "순서가 높을수록 모델에 더 많은 영향을 미치며, 활성화된 로어가 많을 때 잘리지 않습니다.",
bias:"바이어스는 문자열이 나타날 가능성을 수정하는 키-값 데이터로, -100에서 100까지 가능하며 값이 클수록 나타날 가능성이 높고, 값이 작을수록 나타날 가능성이 낮습니다 \n경고: 토큰라이저가 잘못되면 제대로 작동하지 않습니다.",
emotion: "감정 이미지 옵션은 캐릭터의 반응으로 분석된 캐릭터의 감정에 따라 이미지를 표시합니다. 감정 이름은 단어 *(예시: joy, happy, fear 등)* 로 입력해야 하며, **netural** 이라는 이름의 감정이 존재하면 기본 감정이 됩니다. 제대로 작동하려면 이미지가 3개 이상이어야 합니다.",
imggen: "이미지 생성 옵션은 외부 프로그램에서 이미지를 생성하고 생성한 이미지를 표시합니다. 이미지는 현재 채팅을 분석하여 만든 이미지 프롬프트에 의해 생성됩니다. \n이미지 생성은 아래에서 구성할 수 있는 키-값 인수를 기반으로 분석됩니다."
+ "\n\n**'always'** 키는 언제나 들어가며, 바뀌지 않습니다. **'negative'** 키는 항상 이미지 생성의 네거티브 값으로 들어갑니다."
+ "\n\n채팅이 진행됨에 따라 키의 이름에 따라 값이 변경됩니다."
+ "\n\n키의 이름에 다음과 같은 문자가 있다면 특수효과가 있습니다."
+ "\n- 키의 이름이 **|** 로 시작할 시, 값은 고정됩니다."
+ "\n- 키의 이름이 **$** 로 시작할 시, 값은 더 자주 변합니다."
+ "\n\n이미지가 처음 생성된 이후부터는 '현재 이미지 생성 데이터'를 수정하여 변경할 수 있습니다.",
experimental: "실험적 기능입니다. 불안정할 수 있습니다."
},
setup: {
chooseProvider: "AI 제공자를 선택해 주세요",
openaikey: "OpenAI & API Key (권장)",
openaiProxy: "OpenAI 리버스 프록시",
setupmodelself: "그외 / 직접 설정",
inputApiKey: "여기에 API 키를 입력해주세요",
apiKeyhelp: "이곳에서 API키를 얻을 수 있습니다: ",
setupSelfHelp: "첫 셋업 화면이 끝난 뒤, 설정에서 직접 수정해 주세요",
theme: "테마를 입력해 주세요",
texttheme: "텍스트 색상을 선택해주세요",
inputName: "마지막으로, 닉네임을 입력해 주세요"
},
confirm: "확인",
goback: "뒤로",
regexScript: "정규식 스크립트",
type: "타입",
editInput: "입력문 수정",
editOutput: "출력문 수정",
editProcess: "리퀘스트 데이터 수정"
}