bramses / chatgpt-md

A (nearly) seamless integration of ChatGPT into Obsidian.
MIT License
824 stars 61 forks source link

The command "chatGPT MD: chat" should collect questions in respect to the separator <hr class="__chatgpt_plugin"> #57

Closed tkt028 closed 1 year ago

tkt028 commented 1 year ago

Hi there, My markdown file contains many Q&A by chatGPT. It has more than 2000 words and 10,000 characters. Then I created a new question as below example (NOTE: the plugin works well before reaching this point)

<hr class="__chatgpt_plugin">

My new question is here .... (it's about 200 words)

Then I executed the command "chatGPT MD: chat" and encountered this error

image

GUESS: the plugin is collecting all the texts from the beginning of the file. EXPECTED BEHAVIOR: it should collect question content from the nearby separator <hr class="__chatgpt_plugin"> so that only my new question is sent to chatGPT and no error of token limit to occur.

Thank you very much for the good works! Bests,

bramses commented 1 year ago

Hi @tkt028,

Considering implementing a history feature which may help this (https://github.com/bramses/chatgpt-md/issues/55), but no, chatgpt md does not make case by case logic calls about how many messages to send to the api