Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions codegpt.el
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

;;; Code:

(require 'openai)
(require 'openai-completion)

(defgroup codegpt nil
Expand Down Expand Up @@ -84,8 +85,8 @@ boundaries of that region in buffer."
(lambda (data)
(openai--with-buffer codegpt-buffer-name
(openai--pop-to-buffer codegpt-buffer-name)
(let* ((choices (openai-completion--data-choices data))
(result (openai-completion--get-choice choices))
(let* ((choices (openai--data-choices data))
(result (openai--get-choice choices))
(original-point (point)))
(insert (string-trim result) "\n")
(fill-region original-point (point))))
Expand Down