Closed s-kostyaev closed 5 months ago
Not working for code blocks. System prompt doesn't help. Models generates code blocks im markdown syntax.
@ahyatt Am I doing something wrong with system message?
@ahyatt I create interactions with system message, append user message to it and send it to ollama as single request. Should this work?
TODO:
Elisp translation works. There is another issue. Fill region is terrible with org-mode code blocks. Disable lines truncation by default in org-mode and enable word wrapping as advice for users?
@ahyatt I create interactions with system message, append user message to it and send it to ollama as single request. Should this work?
It should work. Are you doing this with ollama? What it does with ollama is to send the system message in the "system" param in the request. If you don't find this effective, you could try adding it to the user message instead. What I try to do with these kinds of problems is see if things work with Open AI or Gemini, which are in my experience better at instruction following than local models are.
You may also want to double-check what is actually being sent. What I usually do is (setq url-debug t)
and then you can check the url debug buffer (I don't remember the name at the moment), searching for the outgoing JSON to verify the request looks correct.
Try to use
org-mode
for chat. Experimental