Skip to content

Instantly share code, notes, and snippets.

@shell909090
Created March 24, 2025 18:21
Show Gist options
  • Save shell909090/37ec6cfe16086a2bcdd4756f3b5cb86c to your computer and use it in GitHub Desktop.
Save shell909090/37ec6cfe16086a2bcdd4756f3b5cb86c to your computer and use it in GitHub Desktop.
run ask_ollama from emacs
(defun run-ask-ollama ()
(interactive)
(let ((background (buffer-string))
(question (read-from-minibuffer "What's your question? "))
(buff (get-buffer-create "ollama")))
(start-process "ollama" buff "ask_ollama.py" "-e" "http://127.0.0.1:11434" "-m" "deepseek-r1:14b" "-fi" question)
(process-send-string "ollama" background)
(process-send-eof "ollama")
(switch-to-buffer buff)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment