[feat] log for streaming

This commit is contained in:
kwaroran
2023-08-03 07:02:58 +09:00
parent 59dea11635
commit 7d369221dc
2 changed files with 19 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ import { DataBase, setDatabase, type character } from "../storage/database";
import { pluginProcess } from "../plugins/plugins";
import { language } from "../../lang";
import { stringlizeAINChat, stringlizeChat, stringlizeChatOba, getStopStrings, unstringlizeAIN, unstringlizeChat } from "./stringlize";
import { globalFetch, isNodeServer, isTauri } from "../storage/globalApi";
import { addFetchLog, globalFetch, isNodeServer, isTauri } from "../storage/globalApi";
import { sleep } from "../util";
import { createDeep } from "./deepai";
import { hubURL } from "../characterCards";
@@ -246,6 +246,13 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
}
}
addFetchLog({
body: body,
response: "Streaming",
success: true,
url: replacerURL,
})
let dataUint = new Uint8Array([])
const transtream = new TransformStream<Uint8Array, string>( {