[feat] continue response

This commit is contained in:
kwaroran
2023-08-17 17:00:10 +09:00
parent 64ee71e2c6
commit 4a66a585f7
9 changed files with 294 additions and 214 deletions

View File

@@ -1,7 +1,7 @@
import { invoke } from "@tauri-apps/api/tauri";
import { globalFetch } from "src/ts/storage/globalApi";
import { sleep } from "src/ts/util";
import path from "@tauri-apps/api/path";
import * as path from "@tauri-apps/api/path";
import { exists } from "@tauri-apps/api/fs";
import { alertClear, alertError, alertMd, alertWait } from "src/ts/alert";
import { get } from "svelte/store";

View File

@@ -5,7 +5,7 @@ import { globalFetch } from "src/ts/storage/globalApi"
import { alertError, alertInput, alertNormal, alertWait } from "src/ts/alert"
import { sleep } from "src/ts/util"
export function stringlizeNAIChat(formated:OpenAIChat[], char:string = ''){
export function stringlizeNAIChat(formated:OpenAIChat[], char:string, continued: boolean){
const db = get(DataBase)
@@ -35,7 +35,12 @@ export function stringlizeNAIChat(formated:OpenAIChat[], char:string = ''){
}
}
return resultString.join(seperator) + `\n\n${char}:`
let res = resultString.join(seperator)
if(!continued){
res += `\n\n${char}:`
}
return res
}
export const novelLogin = async () => {