From 0662f91389f484cad41839b6b68f1a4de199e03e Mon Sep 17 00:00:00 2001 From: Mike 'Fuzzy' Partin Date: Sat, 6 Jul 2024 09:15:38 -0700 Subject: [PATCH] org-ai integration --- lib/thwap-config.el | 9 +++++++++ lib/thwap-org.el | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/lib/thwap-config.el b/lib/thwap-config.el index a32cf7d..23945ad 100644 --- a/lib/thwap-config.el +++ b/lib/thwap-config.el @@ -177,6 +177,15 @@ :type 'boolean :group 'thwap-config-group) +(defcustom thwap-org-enable-org-ai nil + "Whether or not to enable org-ai." + :type 'boolean + :group 'thwap-config-group) + +(defcustom thwap-org-org-ai-token nil + "OpenAI API Token for use in org-ai." + :type 'string + :group 'thwap-config-group) ;; ;; Example usage diff --git a/lib/thwap-org.el b/lib/thwap-org.el index b1e0575..d1c7447 100644 --- a/lib/thwap-org.el +++ b/lib/thwap-org.el @@ -153,6 +153,16 @@ (when (and thwap-org-enable-org thwap-org-enable-org-transclusion) (straight-use-package 'org-transclusion)) +;; org-ai +(when (and thwap-org-enable-org thwap-org-enable-org-ai) + (straight-use-package + '(org-ai :type git :host github :repo "rksm/org-ai" + :local-repo "org-ai" + :files ("*.el" "README.md" "snippets"))) + (setq org-ai-default-chat-model "gpt-3.5-turbo") + (setq org-ai-openai-api-token thwap-org-ai-openai-api-token) + (org-ai-global-mode) + (org-ai-install-yasnippets)) ;; ;; Org mode configuration