Skip to content

Commit

Permalink
1.95.4 (#367)
Browse files Browse the repository at this point in the history
# PR Checklist
- [ ] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [ ] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
  • Loading branch information
kwaroran authored Apr 18, 2024
2 parents 715d4d3 + 19a9211 commit c4166df
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "RisuAI",
"version": "1.95.3"
"version": "1.95.4"
},
"tauri": {
"allowlist": {
Expand Down
3 changes: 3 additions & 0 deletions src/ts/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,9 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
return f[0]
})?.join('§') ?? ''
}
case 'prefill_supported':{
return db.aiModel.startsWith('claude') ? '1' : '0'
}
}
const arra = p1.split("::")
if(arra.length > 1){
Expand Down
19 changes: 15 additions & 4 deletions src/ts/storage/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type { OobaChatCompletionRequestParams } from '../model/ooba';

export const DataBase = writable({} as any as Database)
export const loadedStore = writable(false)
export let appVer = "1.95.3"
export let appVer = "1.95.4"
export let webAppSubVer = ''

export function setDatabase(data:Database){
Expand Down Expand Up @@ -1253,6 +1253,9 @@ export async function importPreset(){
pr.top_p = pre.top_p ?? 1

for(const prompt of pre?.prompt_order?.[0]?.order){
if(!prompt?.enabled){
continue
}
const p = findPrompt(prompt?.identifier ?? '')
if(p){
switch(p.identifier){
Expand Down Expand Up @@ -1295,9 +1298,6 @@ export async function importPreset(){
break
}
case 'worldInfoAfter':{
pr.promptTemplate.push({
type: 'postEverything'
})
break
}
case 'charDescription':{
Expand Down Expand Up @@ -1328,6 +1328,17 @@ export async function importPreset(){

}
}
if(pre?.assistant_prefill){
pr.promptTemplate.push({
type: 'postEverything'
})
pr.promptTemplate.push({
type: 'plain',
type2: 'main',
text: `{{#if {{prefill_supported}}}}${pre?.assistant_prefill}{{/if}}`,
role: 'bot'
})
}
pr.name = "Imported ST Preset"
db.botPresets.push(pr)
setDatabase(db)
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.95.3"}
{"version":"1.95.4"}

0 comments on commit c4166df

Please sign in to comment.