s-kostyaev / ellama

Ellama is a tool for interacting with large language models from Emacs.
GNU General Public License v3.0
359 stars 25 forks source link

Named files #53

Closed Stebalien closed 5 months ago

Stebalien commented 5 months ago

Naming the files leads to all sorts of warnings when killing the buffer. Maybe make sessions optional?

  1. If ellama-sessions-directory is set (default off?), name files and save them automatically.
  2. Otherwise, don't give the file a name.

Also, naming files based on the prompt can lead to really long file names (that don't even make sense as file names).

s-kostyaev commented 5 months ago

About long file name: it uses first n words (configurable). About not using files for sessions - I should think how to do it configurable. Disable it by default looks like bad idea for me - many users can miss this functionality.

s-kostyaev commented 5 months ago

Autosave looks good.

Stebalien commented 5 months ago

IMO, using a prefix of the words just isn't helpful. Ideally you'd just ask the LLM to name the session, but that's likely a waste of GPU. Otherwise, maybe just date them? Or name them after the document being worked on (e.g., if asking a question about a document/code)?

It also doesn't work with languages that don't use spaces between words (e.g., Japanese).

s-kostyaev commented 5 months ago

Sure, you are right. Ask llm to name conversation is universal, but costly (GPU time or tokens). I think we can let user decide which naming scheme to use. With variants like:

Stebalien commented 5 months ago

Yeah, that sounds reasonable. Especially providing a function (that'll let them ask the LLM, or use something from the context).

Maybe let the function choose to resume an existing session? (I may be getting to fancy here, take everything I say with a grain of salt).

s-kostyaev commented 5 months ago

What you mean about resume session? We can't start session without name.

Stebalien commented 5 months ago

Basically, when a user "starts" a session, let this function decide to return an existing session (by, e.g., returning an existing file name).

s-kostyaev commented 5 months ago

There is already load session for this. I don't want to mess my previous sessions with new one.

s-kostyaev commented 5 months ago

Original issue fixed in 0.7.3. But not closing this because of some interesting ideas I want to implement.

s-kostyaev commented 5 months ago

Closing this as fixed, idea moved to #64