Closed johnd0e closed 1 year ago
Another issue: the output of !history can be very very long (and it takes time to retrieve it), while in fact most of the time we are interesting in getting recent items only. So I think it would be convenient to limit output to last 10-20 items, with option to continue.
P.S. Same is for threads
get_chat_history doesnt consume that much resources actually. And this api is aimed for general use so Poe is just an example of the library. I will rectify the example function later. I'm currently resolving the issue related to uploading file limit. Thanks for your patience
Poe is just an example of the library.
And it is very useful example, thank you for improving it!
get_chat_history doesnt consume that much resources actually.
I see in sources that requests are paginated. So if we have, say, 300 items in history, then it leads to 30 separate requests, and I think that consume a lot if time to finish.
So in turn it might make sense to consider that in PoeApi class.
I mean that get_chat_history
and some other methods could be implemented as generators.
Yeah I'm intended to refactor it as well. Im gonna save the chatCode and chatId once when opening a thread.
snowby666 closed this as completed 1 hour ago
But I do not see any related changes in Poe. (The only visible change - !load command implemented, but that is rather #17)
@snowby666 Shouldn't reopen this issue?
I think the current example is good enough. If any improvement then it would be adding paginations for chat history and threads is all (20 each page)
I think the current example is good enough.
Good indeed, but could be even better. Current !history is pretty useless, because we are unable to open chat from it.
!history
command is pretty slow, so it could be several minutes until PoeExample finishes fetching all the items (when I have a lot).
One could think that app hangs.
It would be good if you could improve pagination.
It would be convenient to have such functions: