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