rksm / org-ai

Emacs as your personal AI assistant. Use LLMs such as ChatGPT or LLaMA for text generation or DALL-E and Stable Diffusion for image generation. Also supports speech input / output.
GNU General Public License v3.0
678 stars 54 forks source link

(wrong-type-argument integer-or-marker-p nil) at org-ai-get-block-content when executing org-ai-summerize #67

Open yubrshen opened 1 year ago

yubrshen commented 1 year ago

Here is how I ran into the error.:

#+begin_src java
FipContainer(Module containerModule, ThreadManager thread, String fipGroup, Mode mode){
        this.containerModule = containerModule;
        this.containerThread = thread;

}
#+end_src

when executing org-ai-summerize over the selected region of the whole code in the above block, the resulted buffer *org-ai-on-region*:

** [[file:/mnt/c/Users/yshen/OneDrive - San Francisco Bay Area Rapid Transit District/Documents/my_setup/projects/dev/data-analytics-with-CBTC/data-analytics-with-CBTC.org]]
:LOGBOOK:
CREATED: [2023-07-27 Thu 06:27]
:END:

#+begin_ai
[ME]: In the following I will show you a question and then a text. I want you to answer that question based on the text. Use the text as primary source but also add any external information you think is relevant.

Here is the question:
    Summarize this text.

Here is the text:
    FipContainer(Module containerModule, ThreadManager thread, String fipGroup, Mode mode){
            this.containerModule = containerModule;
            this.containerThread = thread;

    }

#+end_ai

Here is the top of the stack: org-ai-get-block-content((special-block (:standard-properties [24794 25293 24805 25284 0 24794 nil nil nil nil nil nil element nil (section (:standard-properties [24745 25293 24745 25293 0 24745 nil nil nil 24745 25291 section element nil (headline ...) nil nil #<buffer *org-ai-on-region*>])) nil nil #<buffer *org-ai-on-region*>] :type "ai" :parameters nil)))

rksm commented 1 year ago

Yeah this might be similar to #69. Are you using Doom Emacs?