-
-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
myconfig
;;; Code:
;; ~/.spacemacs.d/layers/org-ai/packages.el
; 声明包列表
(defconst org-ai-packages '(org-ai))
(defun org-ai/init-org-ai ()
"Initialize org-ai package."
(use-package org-ai
:ensure t
:commands (org-ai-mode
org-ai-global-mode)
:init
(add-hook 'org-mode-hook #'org-ai-mode) ; enable org-ai in org-mode
(org-ai-global-mode) ; installs global keybindings on C-c M-a
:config
;(setq org-ai-default-chat-model "gpt-4") ; if you are on the gpt-4 beta:
(setq org-ai-service 'deepseek
org-ai-deepseek-api-base "https://api.deepseek.com"
org-ai-deepseek-deployment "deepseek-deployment-name"
org-ai-deepseek-api-version "2023-07-01-preview")
(org-ai-install-yasnippets))) ; if you are using yasnippet and want `ai` snippets
test
#+begin_ai
Is Emacs the greatest editor?
#+end_ai
C-c C-c
result
- when is use (setq org-ai-openai-api-token "sk-your-deepseek-api-key") show: the host is api.openia.com:443
- when is use (setq org-ai-deepseek-api-token "sk-your-deepseek-api-key") show: need org-ai-openai-api-token
Metadata
Metadata
Assignees
Labels
No labels