manateelazycat / mind-wave

Emacs AI plugin based on ChatGPT API
GNU General Public License v3.0
159 stars 25 forks source link

Respect new lines in payload sending to openai #24

Closed thanhvg closed 1 year ago

thanhvg commented 1 year ago

Fix #23

currently int content fields playload sending to openai, new lines are removed and the content becomes a single line. This may confuse chatgpt and its responses will reflect this behaviour when chat is long enough as discussed in #23

This MR fix this problem, it will keep new lines in the payload to avoid the confusion.

manateelazycat commented 1 year ago

@thanhvg You're right, it's my fault.

But sorry that I can't merge your patch because this patch will generate two role when user's input include a customize role.

I have push new patch https://github.com/manateelazycat/mind-wave/commit/9f8f14ed9e3801797fcd4e1c8f7dd18c44bc52c7

Can you help to test it?

Thanks for your digging and patch. ;)

thanhvg commented 1 year ago

No problem @manateelazycat. I'm glad I can help. I'm going to close this MR since you have fixed it. However I think you should should remove this debug message:

https://github.com/manateelazycat/mind-wave/blob/1e76226a89cb03636f1290b06a8b03d286357698/mind_wave.py#L142

manateelazycat commented 1 year ago

@thanhvg I have remove this debug print code, thank you.

Please let know if you have any problem. ;)