;;; module-llm.el --- bullshit generators -*- lexical-binding: t; -*- ;;; ;;; Commentary: ;;; Provides interface to bullshit generators. ;;; ;;; Code: (require 'module-pkg) (pkg/require 'ellama) (require 'llm-ollama) (require 'dired) (setq ellama-language "English") (setq ellama-provider 'ollama) (setq ellama-ollama-binary "/usr/local/bin/ollama") (setopt ellama-provider (make-llm-ollama :chat-model "llama3:latest" :embedding-model "nomic-embed-text" :host "eris.fritz.box" :default-chat-non-standard-params '(("num_ctx" . 8192)))) (setq ellama-keymap-prefix "C-x A e") (with-eval-after-load 'ellama (ellama-setup-keymap)) ;; FIXME: ellama-context-add-file does not accept arguments. may ;; explain why this doesn't work as expected. (defun ellama-context-add-marked-files () "Add all marked files in Dired to Ellama context." (interactive) (let ((marked-files (dired-get-marked-files))) (if (null marked-files) (message "No files marked") (dolist (file marked-files) (ignore-errors (ellama-context-add-file file))) (message "Added %d file(s) to Ellama context" (length marked-files))))) (with-eval-after-load 'dired (define-key dired-mode-map (kbd "C-c e") #'ellama-context-add-marked-files)) ;;(pkg/require 'org-ai) (straight-use-package '(org-ai :type git :host github :repo "lneely/org-ai")) (require 'org-ai) (add-hook 'org-mode-hook #'org-ai-mode) (require 'module-ellama-capture) (provide 'module-llm) ;;; module-llm.el ends here.