Fix streaming response handling in sendChat function

This commit is contained in:
kwaroran
2024-01-13 10:41:12 +09:00
parent 88e88b9ce6
commit b402195e18
3 changed files with 31 additions and 11 deletions

View File

@@ -158,7 +158,6 @@ export async function runLocalModel(prompt:string){
export async function installPython(){
const appDir = await path.appDataDir()
const completedPath = await path.join(appDir, 'python', 'completed.txt')
console.log(await resolveResource('/src-python/'))
if(await exists(completedPath)){
alertMd("Python is already installed")
return
@@ -176,7 +175,11 @@ export async function installPython(){
await invoke('post_py_install', {
path: appDir
})
const srvPath = await resolveResource('/src-python/')
await invoke('run_py_server', {
path: srvPath
})
alertClear()
}