Created
March 24, 2025 18:21
-
-
Save shell909090/37ec6cfe16086a2bcdd4756f3b5cb86c to your computer and use it in GitHub Desktop.
run ask_ollama from emacs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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