L-a-r-t / chatgpt-to-notion

ChatGPT to Notion brings the cleverness of ChatGPT right into your Notion workspace!
https://chrome.google.com/webstore/detail/chatgpt-to-notion/oojndninaelbpllebamcojkdecjjhcle
332 stars 64 forks source link

Save Full Chat [Save Failed] #3

Closed juliofmendes closed 1 year ago

juliofmendes commented 1 year ago

First of all, congratulations on the project. It has helped me a lot.

In some chats, not all, I've been having problems saving the entire dialog. Would there be any solution? Thanks.

L-a-r-t commented 1 year ago

Hi, thanks for opening an issue for this, I'm glad that the extension is useful to you!

Can you tell me more about the chats where the saving process fails : how long are they (approximately)? Do they contain some kind of special formatting (tables, etc.)?

I'm not aware of a specific saving issue at the moment, but if there's one it might be due to one of these factors. I'll work on fixing this ASAP!

juliofmendes commented 1 year ago

For sure.

I'm using a Macbook with Chrome Version 109.0.5414.119. I couldn't identify anything unusual, in fact the database table was set up similarly to the example.

In some chats created, when clicking on [Save full Chat], in a few seconds of processing it displays the result [Discussion Saved]. However, in other chats created, when clicking on [Save full Chat], in a few seconds of processing it presents the result [Save Failed].

Analyzing the chats, one of the possibilities would be the size or the number of entries. One of them had more than 10 entries. Another possibility may be that some of these entries have been rewritten. Leaving the first ones hidden and showing the marker <2/2> or <3/3>.

L-a-r-t commented 1 year ago

Thanks a lot for the additionnal info. ATM the extension saves the whole conversation in one API call which won't work with very long conversations, I will be working on a fix tomorrow & it should be published within a 48hrs window.

I will also investigate the behavior of the extension with rewritten entires in case there is something breaking here too, thanks again for your feedback!

juliofmendes commented 1 year ago

Excellent. And thank you for your attention. Let me know when you make the changes so I can look into it and give you more feedback.

L-a-r-t commented 1 year ago

It took more time than usual for the new release to be verified but it's finally public. The issue with long conversations was that Notion doesn't allow more than 100 blocs to be generated in one API call, so longer conversations are now split into multiple calls and it works fine!

I'm not yet closing this issue as I need to know if saving still fails with other types of conversations

juliofmendes commented 1 year ago

Hey Theo! Perfectly understandable. This kind of process sometimes takes a long time.

From my quick analysis, these tweaks had good results. Some of the Chats that were not saved, now its saved. However, I'm afraid I ran into another possible problem in this context.

In some cases, the free version does not remember previous entries, forcing us to copy the output and attach it to the question. This makes the prompt's question very large, and may cause an error in saving. At least that's what I was able to observe when the error appeared.

juliofmendes commented 1 year ago

Update. I tested my theory in another chat and it saved correctly. I cannot claim that my theory is correct.

L-a-r-t commented 1 year ago

Hi, I saw your comments while being busy with something else, sorry for not answering!

It seems like there are still some instances of save failing although I haven't been able to find any reason or pattern for this yet. Have you been able to save the chat that had an issue with after all?

Although the problem isn't exactly 100% fixed, I will be closing this issue for now until another clear instance of the saving process failing is found in a specific situation.

L-a-r-t commented 1 year ago

Quick update: I still wanted to inspect your intuition with long prompts & found that the Notion API doesn't allow blocks with a length > 2000 characters to be generated, which does causes an issue with very long prompts and may affect some instances of ChatGPT answering with a very long paragraph (i guess).

I will be releasing a hotfix in the following hours

juliofmendes commented 1 year ago

Hello Théo, sorry for not answering sooner. In my last tests there were no errors. I believe that for now everything is going well. I think it's okay to close this topic. Thank you for your attention! Hugs.