diff --git a/emacs/.emacs.d/packages/llm/llm.el b/emacs/.emacs.d/packages/llm/llm.el index d20cc05..48db576 100644 --- a/emacs/.emacs.d/packages/llm/llm.el +++ b/emacs/.emacs.d/packages/llm/llm.el @@ -86,7 +86,7 @@ (goto-char (point-max)) (newline) (newline) - (insert (format "[llm %s]" string)))) + (insert (format "[llm %s]" (s-trim string))))) (defun llm--run-async (name buffer-name &rest llm-args) "Run llm with LLM-ARGS asynchronously. @@ -221,6 +221,7 @@ The process is named NAME and runs in BUFFER-NAME." (list "-m" llm-model)))) (append (list "chat") model sys opts))) +;;;###autoload (defun llm-chat (system-prompt &optional name) "Start a chat session with llm, prompting it with SYSTEM-PROMPT, naming the process and buffer NAME." (interactive (list (read-string "System prompt: " "You are a helpful AI assistant.") @@ -243,6 +244,7 @@ The process is named NAME and runs in BUFFER-NAME." (when buffer (pop-to-buffer buffer)))) +;;;###autoload (defun llm-doctor () "Start a psychotherapy session with llm." (interactive)