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