s-kostyaev / ellama

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

Better support for several different models #161

Open vslavkin opened 1 month ago

vslavkin commented 1 month ago

Hello, sorry if the title isn't the best, I just couldn't think of something better. The problem I have is that I'm trying out several models, and each one works best with a different prompt. Especially those that are specifically made for a task, like *-code models. Therefore, templates should be way more versatile and customizable.

I was thinking that it would be great if, when defining a new provider, one could set the templates. Something like

(setopt ellama-providers
    '(("zephyr" . (make-llm-ollama
        :chat-model "zephyr:7b-beta-q6_K"
        :embedding-model "zephyr:7b-beta-q6_K"))
        ...
        :templates
        ((code-completion . "Complete the following code in a single markdown block: %s")
        (etc...))))

This + what was discussed on #110 + maybe a system to detect whether a model in installed or not would make ellama way better to set up (probably this part should be another issue) I can contribute, but I'm still getting the FSF copyright assignment (+ I'm not the best elisper out there)