RedPiarOfficial / FreeGPTFix

freeGPTFix provides free access to text and image generation models
https://pypi.org/project/freeGPTFix/
MIT License
2 stars 1 forks source link

the AI can't remember previous messages sent to or from it. #2

Open tony-mathias-buchanan opened 3 weeks ago

tony-mathias-buchanan commented 3 weeks ago

is there any way to fix this? I'm planning on just adding all messages to a single prompt to the character, but i get the feeling that it will significantly slow everything down.

RedPiarOfficial commented 3 weeks ago

Are you using the Room() function? Let's assume you are. At the end, do you declare saving the history with saveHistory?

If you're using Room in a single session, the data gets deleted after a restart because "Temporary memory" is being used. To save the data, you need to call .saveHistory(), and then load the created file into Room with the parameter history_path: Room(history_path="./history.json").

I'm not denying the fact that the error could be on our side, but without additional information from you, it's hard to say anything for sure.

Actually, there can be many nuances, but I'll work on optimizing all of this a bit later.

tony-mathias-buchanan commented 3 weeks ago

What's the room function? I've just been using the create completion function from the documentation

RedPiarOfficial commented 3 weeks ago

I am almost certain that you will find the solutions by reading this: https://red-3.gitbook.io/freegptfix/lib/room