Is there limit for comment_code function?
dnyansagar opened this issue · 2 comments
Thanks for the helpful package.
I tried the comment_code function and it does what is expected. However, when I give it a somewhat larger chunk (e.g a function with 12-15 commands), it only comments on the first few and ignores the rest. So I wanted to know if there is a limit as to how many lines/commands it can comment?
And is that limit set by you or by chatgpt?
I can provide an example if you want but any code with more than 10 lines would reproduce the behaviour, I think.
Thanks in advance
Rohit
Hi @dnyansagar , I've seen this issue before. Unfortunately, there is no way of fixing it from our side, this is a ChatGPT API limitation that they still need to work on. When they implement some update on this, I will surely get it added to this package.
My best advice/workaround is selecting shorter code chunks -part by part-.
Hi @dnyansagar , I coded a workaround in PR #31 , could you test if it solved your issue?
Install this version by doing remotes::install_github("jcrodriguez1989/chatgpt@feature.jcr.chatgpt_continue_trimmed_messages")
Thanks!