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

User option for session naming scheme #64

Closed s-kostyaev closed 5 months ago

s-kostyaev commented 5 months ago

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:

s-kostyaev commented 5 months ago

For generating names with llm prompt template may look like this:

I will get you user query, you should return short topic only, what
this conversation about. NEVER respond to query itself.
For example:
Query: Why is sky blue?
Topic: Blue sky.

Query: %s
Topic:
s-kostyaev commented 5 months ago

Need to be added new custom variable like ellama-naming-scheme, custom variable with prompt template for this, function ellama-generate-name should be changed.

UPD. Also custom variable ellama-naming-provider witout default value. If not set default ellama provider should be used for name generation.