Closed boygoboy closed 1 year ago
Can you show us the error that happens while it restarts? did you set read and write permissions for the path you specify in savePath?
Maybe the file path I set nodemon to ignore monitoring is wrong, and it runs normally on another computer
Maybe the file path I set nodemon to ignore monitoring is wrong, and it runs normally on another computer
thank you, I found the problem was read/write permissions for the file directory, fixed in the latest version (1.0.6)
Maybe the file path I set nodemon to ignore monitoring is wrong, and it runs normally on another computer
thank you, I found the problem was read/write permissions for the file directory, fixed in the latest version (1.0.6)
Haha I will update
const bardUnofficalChat=async (req,res)=>{ let {message}=req.body const {Bard} = await import("googlebard")
let cookies =
__Secure-1PSID=${process.env.BARD_AUTH}
;let bot = new Bard(cookies, { inMemory: false, // optional: if true, it will not save conversations to disk savePath: "./chatjson/conversations.json", // optional: path to save conversations });
let conversationId = "conversation name"; // optional: to make it remember the conversation
// let response = await bot.ask(message); // conversationId is optional // console.log(response); // res.json({ // data:response // })
// Simulating response streaming await bot.askStream( (res) => { console.log(res); }, message, // conversationId, ); }
module.exports={ bardUnofficalChat }
I ran the above code and found that adding { inMemory: false, // optional: if true, it will not save conversations to disk savePath: "./chatjson/conversations.json", // optional: path to save conversations } With this code, node will be restarted due to changes in the file, resulting in the inability to output chat messages. Then I configure { in nodemon.json "ignore": [ "chatjson/*" ] } It doesn't work either, do you guys know how to solve it?