letta-ai / letta

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

The assistant does not complete the requests completely - interrupting halfway through #958

Open peperunas opened 9 months ago

peperunas commented 9 months ago

Describe the bug

The assistant does not complete the requests. In the example below you can see how I request some changes in a file provided via the OAI embeddings: it never prints back the revised file, though.

> Enter your message: /attach
Warning: the following sources are not compatible with this agent's embedding model and dimension: []
? Select data source frontend
Ingesting 3 passages into default
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 47.77it/s]
Attached data source frontend to agent default, consisting of 3. Agent now has 3 embeddings in archival memory.
> Enter your message: How would you improve the route.ts file I gave you?
💭 Searching recall memory for information about the user's code review request.
⚡🧠 [function] searching memory with conversation_search
        query: route.ts file, page: 0
💭 No prior information found about the user's code review request. Will provide initial analysis.
🤖 Let me take a look at your route.ts file. I'll analyze it and get back to you with some suggestions!
> Enter your message: So?
💭 Searching recall memory for information about the user's code review request.
⚡🧠 [function] searching memory with conversation_search
        query: route.ts file, page: 0
💭 No prior information found about the user's code review request. Will provide initial analysis.
🤖 Apologies for the delay, Giulio. Here are some suggestions to improve your route.ts file:
> Enter your message: I don't see the suggestions...
💭 User didn't receive the suggestions. Need to send a follow-up message with the actual improvements.
🤖 - Use typed routes to ensure type safety
- Add error handling for invalid requests
- Implement caching for frequently accessed routes
> Enter your message: Fantastic. Can you print the corrected source file alltogether please?
💭 Searching recall memory for information about the user's code review request.
⚡🧠 [function] searching memory with conversation_search
        query: route.ts file, page: 0
💭 User requested the corrected source file. Need to send a follow-up message with the updated code.
🤖 Here's your updated route.ts file with the suggested improvements:
> Enter your message: I don't see the file...
💭 Searching recall memory for information about the user's code review request.
⚡🧠 [function] searching memory with conversation_search
        query: route.ts file, page: 0
💭 User didn't receive the updated code. Need to send a follow-up message with the revised route.ts file.
🤖 Apologies for the confusion, Giulio. Here is your updated route.ts file:
> Enter your message: I don't see the updated code!
💭 Searching recall memory for information about the user's code review request.
⚡🧠 [function] searching memory with conversation_search
        query: route.ts file, page: 0
💭 User is still unable to see the updated code. Need to send a follow-up message with the revised route.ts file, again.
🤖 I apologize for the inconvenience, Giulio. Here's your updated route.ts file:
> Enter your message:

If you're not using OpenAI, please provide additional information on your local LLM setup:

Local LLM details

If you are trying to run MemGPT with local LLMs, please provide the following information:

sarahwooders commented 9 months ago

It looks like the agent is searching recall memory, but /attach will place data in archival. Can you try giving it a hint, e.g. "Search your archival memory..."?

peperunas commented 9 months ago

Done. Unfortunately, it still does not print back anything:

💭 User is unable to see the updated code. Need to send a follow-up message with the revised route.ts file, once more.
🤖 Giulio, I'm really sorry for the confusion. Here is your updated route.ts file:
> Enter your message: Please use your archival memory to show me how you would edit it
💭 Searching archival memory for information about the user's code review request.
⚡🧠 [function] searching memory with archival_memory_search
        query: route.ts file improvements, page: 0
Number of requested results 100 is greater than number of elements in index 3, updating n_results = 3
💭 User requested to see the edited route.ts file using archival memory search results.
🤖 Giulio, I apologize for the confusion earlier. Here's an example of how I would edit the route.ts file based on your request:
> Enter your message: I don't see the code...
💭 Searching recall memory for information about the user's code review request.
⚡🧠 [function] searching memory with conversation_search
        query: route.ts file, page: 0
💭 User is still unable to see the updated code. Need to send a follow-up message with the revised route.ts file.
🤖 Giulio, I apologize for the inconvenience. Here is your updated route.ts file based on my archival memory search results:
> Enter your message: