[ref] remove unused
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
import { get, writable } from "svelte/store";
|
import { get, writable } from "svelte/store";
|
||||||
import { DataBase, saveImage, setDatabase, type character, type Chat, defaultSdDataFunc } from "./storage/database";
|
import { DataBase, saveImage, setDatabase, type character, type Chat, defaultSdDataFunc } from "./storage/database";
|
||||||
import { alertConfirm, alertError, alertNormal, alertSelect, alertStore } from "./alert";
|
import { alertError, alertNormal, alertSelect, alertStore } from "./alert";
|
||||||
import { language } from "../lang";
|
import { language } from "../lang";
|
||||||
import { encode as encodeMsgpack, decode as decodeMsgpack } from "msgpackr";
|
import { decode as decodeMsgpack } from "msgpackr";
|
||||||
import { checkNullish, findCharacterbyId, selectMultipleFile, selectSingleFile, sleep } from "./util";
|
import { checkNullish, findCharacterbyId, selectMultipleFile, selectSingleFile, sleep } from "./util";
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import { selectedCharID } from "./stores";
|
import { selectedCharID } from "./stores";
|
||||||
import { checkCharOrder, downloadFile, getFileSrc, readImage } from "./storage/globalApi";
|
import { checkCharOrder, downloadFile, getFileSrc } from "./storage/globalApi";
|
||||||
import * as yuso from 'yuso'
|
import * as yuso from 'yuso'
|
||||||
import { reencodeImage } from "./image";
|
import { reencodeImage } from "./image";
|
||||||
import { updateInlayScreen } from "./process/inlayScreen";
|
import { updateInlayScreen } from "./process/inlayScreen";
|
||||||
|
|||||||
@@ -11,15 +11,8 @@ import { selectedCharID } from './stores';
|
|||||||
import { calcString } from './process/infunctions';
|
import { calcString } from './process/infunctions';
|
||||||
import { findCharacterbyId } from './util';
|
import { findCharacterbyId } from './util';
|
||||||
import { getInlayImage } from './image';
|
import { getInlayImage } from './image';
|
||||||
import { cloneDeep } from 'lodash';
|
|
||||||
import { autoMarkNew } from './plugins/automark';
|
import { autoMarkNew } from './plugins/automark';
|
||||||
|
|
||||||
const convertora = new showdown.Converter({
|
|
||||||
simpleLineBreaks: true,
|
|
||||||
strikethrough: true,
|
|
||||||
tables: true
|
|
||||||
})
|
|
||||||
|
|
||||||
const mconverted = new Marked({
|
const mconverted = new Marked({
|
||||||
gfm: true,
|
gfm: true,
|
||||||
breaks: true,
|
breaks: true,
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ import { exampleMessage } from "./exampleMessages";
|
|||||||
import { sayTTS } from "./tts";
|
import { sayTTS } from "./tts";
|
||||||
import { supaMemory } from "./memory/supaMemory";
|
import { supaMemory } from "./memory/supaMemory";
|
||||||
import { v4 } from "uuid";
|
import { v4 } from "uuid";
|
||||||
import { clone, cloneDeep } from "lodash";
|
import { cloneDeep } from "lodash";
|
||||||
import { groupOrder } from "./group";
|
import { groupOrder } from "./group";
|
||||||
import { runTrigger, type additonalSysPrompt } from "./triggers";
|
import { runTrigger } from "./triggers";
|
||||||
import { HypaProcesser } from "./memory/hypamemory";
|
import { HypaProcesser } from "./memory/hypamemory";
|
||||||
import { additionalInformations } from "./embedding/addinfo";
|
import { additionalInformations } from "./embedding/addinfo";
|
||||||
import { cipherChat, decipherChat } from "./cipherChat";
|
import { cipherChat, decipherChat } from "./cipherChat";
|
||||||
|
|||||||
@@ -47,14 +47,12 @@ type requestDataResponse = {
|
|||||||
}|{
|
}|{
|
||||||
type: "streaming",
|
type: "streaming",
|
||||||
result: ReadableStream<string>,
|
result: ReadableStream<string>,
|
||||||
noRetry?: boolean,
|
|
||||||
special?: {
|
special?: {
|
||||||
emotion?: string
|
emotion?: string
|
||||||
}
|
}
|
||||||
}|{
|
}|{
|
||||||
type: "multiline",
|
type: "multiline",
|
||||||
result: ['user'|'char',string][],
|
result: ['user'|'char',string][],
|
||||||
noRetry?: boolean,
|
|
||||||
special?: {
|
special?: {
|
||||||
emotion?: string
|
emotion?: string
|
||||||
}
|
}
|
||||||
@@ -117,7 +115,6 @@ export interface OpenAIChatExtra {
|
|||||||
|
|
||||||
export async function requestChatDataMain(arg:requestDataArgument, model:'model'|'submodel', abortSignal:AbortSignal=null):Promise<requestDataResponse> {
|
export async function requestChatDataMain(arg:requestDataArgument, model:'model'|'submodel', abortSignal:AbortSignal=null):Promise<requestDataResponse> {
|
||||||
const db = get(DataBase)
|
const db = get(DataBase)
|
||||||
let result = ''
|
|
||||||
let formated = cloneDeep(arg.formated)
|
let formated = cloneDeep(arg.formated)
|
||||||
let maxTokens = arg.maxTokens ??db.maxResponse
|
let maxTokens = arg.maxTokens ??db.maxResponse
|
||||||
let temperature = arg.temperature ?? (db.temperature / 100)
|
let temperature = arg.temperature ?? (db.temperature / 100)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { get } from "svelte/store";
|
import { get } from "svelte/store";
|
||||||
import type { OpenAIChat } from ".";
|
import type { OpenAIChat } from ".";
|
||||||
import { tokenize } from "../tokenizer";
|
|
||||||
import { DataBase } from "../storage/database";
|
import { DataBase } from "../storage/database";
|
||||||
|
|
||||||
export function multiChatReplacer(){
|
export function multiChatReplacer(){
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import localforage from "localforage"
|
import localforage from "localforage"
|
||||||
import { getUnpargeables, isNodeServer, replaceDbResources } from "./globalApi"
|
import { isNodeServer, replaceDbResources } from "./globalApi"
|
||||||
import { NodeStorage } from "./nodeStorage"
|
import { NodeStorage } from "./nodeStorage"
|
||||||
import { OpfsStorage } from "./opfsStorage"
|
import { OpfsStorage } from "./opfsStorage"
|
||||||
import { alertConfirm, alertSelect, alertStore } from "../alert"
|
import { alertSelect, alertStore } from "../alert"
|
||||||
import { get } from "svelte/store"
|
import { get } from "svelte/store"
|
||||||
import { DataBase, type Database } from "./database"
|
import { DataBase, type Database } from "./database"
|
||||||
import { AccountStorage } from "./accountStorage"
|
import { AccountStorage } from "./accountStorage"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { changeLanguage, language } from '../../lang';
|
|||||||
import type { RisuPlugin } from '../plugins/plugins';
|
import type { RisuPlugin } from '../plugins/plugins';
|
||||||
import type {triggerscript as triggerscriptMain} from '../process/triggers';
|
import type {triggerscript as triggerscriptMain} from '../process/triggers';
|
||||||
import { downloadFile, saveAsset as saveImageGlobal } from './globalApi';
|
import { downloadFile, saveAsset as saveImageGlobal } from './globalApi';
|
||||||
import { clone, cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
import { defaultAutoSuggestPrompt, defaultJailbreak, defaultMainPrompt } from './defaultPrompts';
|
import { defaultAutoSuggestPrompt, defaultJailbreak, defaultMainPrompt } from './defaultPrompts';
|
||||||
import { alertNormal, alertSelect } from '../alert';
|
import { alertNormal, alertSelect } from '../alert';
|
||||||
import type { NAISettings } from '../process/models/nai';
|
import type { NAISettings } from '../process/models/nai';
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { get } from "svelte/store";
|
|||||||
import type { OpenAIChat } from "./process";
|
import type { OpenAIChat } from "./process";
|
||||||
import { supportsInlayImage } from "./image";
|
import { supportsInlayImage } from "./image";
|
||||||
import { risuChatParser } from "./parser";
|
import { risuChatParser } from "./parser";
|
||||||
import type { Proompt } from "./process/proompt";
|
|
||||||
|
|
||||||
async function encode(data:string):Promise<(number[]|Uint32Array|Int32Array)>{
|
async function encode(data:string):Promise<(number[]|Uint32Array|Int32Array)>{
|
||||||
let db = get(DataBase)
|
let db = get(DataBase)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const isOldDomain = location.hostname.includes('pages.dev')
|
|||||||
|
|
||||||
export async function checkUpdate(){
|
export async function checkUpdate(){
|
||||||
try {
|
try {
|
||||||
let db = get(DataBase)
|
let db = get(DataBase)
|
||||||
const da = await fetch('https://raw.githubusercontent.com/kwaroran/RisuAI-release/main/version.json')
|
const da = await fetch('https://raw.githubusercontent.com/kwaroran/RisuAI-release/main/version.json')
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
const v:string = da.data.version
|
const v:string = da.data.version
|
||||||
|
|||||||
Reference in New Issue
Block a user