letta-ai / letta

Letta (formerly MemGPT) is a framework for creating LLM services with memory.
https://letta.com
Apache License 2.0
13.09k stars 1.44k forks source link

Archival memory/Memory issues #381

Open TheOnlyWiseJEDI opened 1 year ago

TheOnlyWiseJEDI commented 1 year ago

Using: text-generastion-webui Model: ehartford_dolphin-2.2-mistral-7b - not quantized Installed: using pip install -r requirements OS: Windows 10 Shell: cmd.exe Python: Python 3.11.3 pymemgpt installed: yes Hardware: 12th Gen i7 64GB/RAM, RTX3060 12GB RAM LLM and MemGPT on same system

There seems to be a problem with the archival memory usage (it's not happening) since I updated to memgpt 1.8

image

Including this in case it's related, I see this often after a few pages of conversation it repeats: image

sarahwooders commented 1 year ago

Could you double check your config ~/.memgpt/config to make sure archival memory is set to local? You should see something like this:

[archival_storage]
type = local

If that looks ok, when can you try re-running with memgpt run --debug and see if it outputs additional logs?

Can you also check what happens if you run the /memory command?

TheOnlyWiseJEDI commented 1 year ago

config shows: [archival_storage] type = local

/memory works fine, the archival section is empty, any memory editing fails, core_memory_update/edit/etc, same with archival memory, I just get; insert error RetryError[<Future at 0x204beff9310 state=finished raised AuthenticationError>]

TheOnlyWiseJEDI commented 1 year ago

trying --debug

sarahwooders commented 1 year ago

Could you show a screenshot of what happens with a core memory update?

TheOnlyWiseJEDI commented 1 year ago

lol this time it has no knowledge of that function, normally it reports the authentication error image

TheOnlyWiseJEDI commented 1 year ago

not sure if it's related but if you recall- after I updated yesterday, in another ticket I reported the following trouble and you told me to delete .memgpt/config to fix it image

TheOnlyWiseJEDI commented 1 year ago

I found this in the output:

Incorrect API key provided: NULL. You can find your API key at https://platform.openai.com/account/api-keys.

I am hosting locally and not using OpenAI, I will remove the env variable for OPENAI_API_KEY as I do not need it and set it as a 'just in case' since I saw it had a bearing on something else I was reading about I threw it in there. I'll remove it and start over and see what happens.

TheOnlyWiseJEDI commented 1 year ago

I now get this when I start without that env variable:

image

TheOnlyWiseJEDI commented 1 year ago

confirmed that webui is set as the BACKEND_TYPE image

cpacker commented 1 year ago

confirmed that webui is set as the BACKEND_TYPE image

The last few errors are from not having OPENAI_API_BASE set (you need both BACKEND_TYPE and OPENAI_API_BASE to be set, https://memgpt.readthedocs.io/en/latest/webui/). Not sure about the archival memory error, that's odd, looking into it.

sarahwooders commented 1 year ago

Can you share whats in your ~/.memgpt/config in the [embedding] section?

TheOnlyWiseJEDI commented 1 year ago

[embedding] model = local dim = 384 chunk_size = 300

TheOnlyWiseJEDI commented 1 year ago

cpacker, above you said: The last few errors are from not having OPENAI_API_BASE set (you need both BACKEND_TYPE and OPENAI_API_BASE to be set, https://memgpt.readthedocs.io/en/latest/webui/). Not sure about the archival memory error, that's odd, looking into it.

This is untrue for me, both of those variables are and have been set - those errors are not caused by a lack of having those env vars set properly in my case. Also note that the OPENAI_API_KEY is one the I mentioned because --debug revealed the detail I posted above complaining that I do not have a valid API KEY

sarahwooders commented 1 year ago

Hm so I'm pretty confused why there would be any kind of authentication error, since everything should be done locally for the embeddings if thats what your config is set to. Could you try running with memgpt installed via pip install pymemgpt-nightly and see if you have the same issues?

TheOnlyWiseJEDI commented 1 year ago

ok sure, can I just run that in the current memgpt conda env?

TheOnlyWiseJEDI commented 1 year ago

btw. I had to restore the system env variable OPENAI_API_KEY=Null in order to run memgpt, without it I get the invalid API key error above and can't run memgpt at all.

TheOnlyWiseJEDI commented 1 year ago

I'm not sure if I should do this on top of my current install or not, waiting for confirmation from you. Also if you have Anydesk installed I can give you my ID so you can check it out for yourself

sarahwooders commented 1 year ago

Could you try:

pip uninstall pymemgpt 
pip install -U pymemgpt-nightly
TheOnlyWiseJEDI commented 1 year ago

Things appear to be working, the archival memory is being populated without error, what should I do now?

sarahwooders commented 1 year ago

Are there any other problems? If not I can close this issue.

TheOnlyWiseJEDI commented 1 year ago

I 'think' things are working properly, will this nightly build become tomorrow's update? should I 'pip uninstall' it and normally install memgpt tomorrow?