xenodium / chatgpt-shell

A multi-llm Emacs shell (ChatGPT, Claude, Gemini) + editing integrations
https://xenodium.com
GNU General Public License v3.0
855 stars 76 forks source link

Proofread: Keyword argument :on-finished not one of ... #241

Closed jaeyeom closed 3 weeks ago

jaeyeom commented 3 weeks ago

I'm getting the following message when I call chatgpt-shell-proofread-region.

chatgpt-shell-post-chatgpt-messages: Keyword argument :on-finished not one of (:messages :version :other-params :on-output :on-success :on-failure :temperature :streaming)

I haven't debugged it yet, but I'm posting the issue early.

How I reproduced it:

Emacs version: GNU Emacs 29.4 (build 1, aarch64-unknown-linux-android) of 2024-10-04

jaeyeom commented 3 weeks ago

Here's the relevant call stack.

Debugger entered--Lisp error: (error "Keyword argument :on-finished not one of (:message...")
  signal(error ("Keyword argument :on-finished not one of (:message..."))
  error("Keyword argument %s not one of (:messages :version..." :on-finished)
  chatgpt-shell-post-chatgpt-messages(:messages [((role . "system") (content . "Please help me proofread the following English tex...")) ((role . "user") (content . [((type . "text") (text . #("\n\nIt is also convenient to use ProtoValidate on th..." 2 64 ...)))]))] :version nil :streaming t :on-output #f(compiled-function (chunk) #<bytecode -0x12999775c680bbae>) :on-finished #f(compiled-function (success) #<bytecode 0x1fa887f837b2781f>))
  chatgpt-shell-send-contextless-request(:query #("\n\nIt is also convenient to use ProtoValidate on th..." 2 64 (fontified t org-category "20241018144725-protocol_buffer_validation_best_pra...")) :model-version nil :system-prompt "Please help me proofread the following English tex..." :streaming t :on-output #f(compiled-function (chunk) #<bytecode -0x12999775c680bbae>) :on-finished #f(compiled-function (success) #<bytecode 0x1fa887f837b2781f>))
  chatgpt-shell-request-and-insert-merged-response(:system-prompt "Please help me proofread the following English tex..." :query "")
  chatgpt-shell-proofread-region()
jaeyeom commented 3 weeks ago

The error is bypassed by adding a key on-finished, but the proofread still doesn't seem to work properly.

  (cl-defun chatgpt-shell-post-chatgpt-messages (&key messages version
                                                      other-params on-output
                                                      on-success on-failure
+                                                     on-finished
                                                      temperature streaming)
xenodium commented 3 weeks ago

Can you update shell-maker too? Should fix that. Let me know if it doesn't.

xenodium commented 3 weeks ago

Nevermind... it's something else. Fixing now.

xenodium commented 3 weeks ago

Ok, try v1.18.1. Lemme know if that doesn't fix it.

jaeyeom commented 3 weeks ago

Oh, thank you so much for the quick fix!!! I was thinking of debugging it by myself on the weekend.

It works very well now.

xenodium commented 3 weeks ago

Thank you. Great to hear it. Please consider sponsoring the project to make feature requests, improvements, and general maintenance sustainable.