s-kostyaev / ellama

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

Context for new sessions #112

Closed tbatchelli closed 5 days ago

tbatchelli commented 2 months ago

Use case: when I want to start a new session, I might want to first build the context before I send the prompt and start a new session.

Current state: context is attached to sessions, so if the session does not exist you can't attach context to it. When adding context and then creating a new session the context is added to the previous session instead. To start a new session with context you need to first create a session with a bogus prompt, which will get a (confused) response from the LLM, and then add the context and then run a new prompt in this new session, and then the second prompt has the context.

One option would be that the context is added in a session-free stack, and that only when you are about to issue a prompt the context is attached to the session before the chat is sent to the LLM

s-kostyaev commented 2 months ago

If you have no active sessions it will be added to temporal location (variable) and will be used in new session. You can kill buffer with previous session instead of prompting with dummy message

s-kostyaev commented 5 days ago

Should be fixed now