Coder Social home page Coder Social logo

Comments (11)

snowby666 avatar snowby666 commented on May 20, 2024

I think it tends to be a problem with the poe.com website itself. Sometimes, even when I manually submit the question in the browser, the answer is not generated.

from poe-api-wrapper.

johnd0e avatar johnd0e commented on May 20, 2024

Sure it is poe.com problem.
And the subject of this issue is proper handling of this case, as it seems to be pretty common.

from poe-api-wrapper.

snowby666 avatar snowby666 commented on May 20, 2024

I tried to reproduce this and caused the bot to enter a 'did not respond' loop, but I was only able to make it generate again by clearing the context and resending the message (kinda awkward). I suppose you could implement a try-except for that.

from poe-api-wrapper.

7trail avatar 7trail commented on May 20, 2024

Hello,

An issue I've been having is the POE backend not responding, but the api not catching the timeout and instead halting the program indefinitely. Do you think you might know what is causing this error? More details can be provided if needed.

from poe-api-wrapper.

snowby666 avatar snowby666 commented on May 20, 2024

Hello,

An issue I've been having is the POE backend not responding, but the api not catching the timeout and instead halting the program indefinitely. Do you think you might know what is causing this error? More details can be provided if needed.

If your program is just halting but not in an inf loop then this may help:
You can inspect the api.py and will find that send_message has a timeout arg. You can set a lower value for this arg:

for chunk in client.send_message(bot, message, timeout=2):
      print(chunk['response'], end='', flush=True)

from poe-api-wrapper.

johnd0e avatar johnd0e commented on May 20, 2024

I suppose you could implement a try-except for that.

Do you mean something like this?

def main():
    try:
        Poe.chat_with_bot(token)
    except RuntimeError:
        main()

main()

This seems not to be a good solution, as then I must manually re-choose bot and thread (do I ever remember those?).
It would be much more convenient if Poe would recover from this error without user intervention, as it already knows both bot's name an thread's code.

from poe-api-wrapper.

snowby666 avatar snowby666 commented on May 20, 2024

As I've mentioned above, I tried to reproduce this error, but my attempts to cancel and resend the message still results in "did not respond" loop. Currently, I could only clear the context and start over. Maybe this error has something to do with poe.com itself

from poe-api-wrapper.

johnd0e avatar johnd0e commented on May 20, 2024

Currently, I could only clear the context and start over.

Even if you are doing that on poe.com?

Currently, I could only clear the context and start over.

I understand. I this case instead of exception I would prefer to see such message:

Poe.com error. Please !clear context.

from poe-api-wrapper.

snowby666 avatar snowby666 commented on May 20, 2024

Currently, I could only clear the context and start over.

Even if you are doing that on poe.com?

Currently, I could only clear the context and start over.

I understand. I this case instead of exception I would prefer to see such message:

Poe.com error. Please !clear context.

Yeah. I think I will let the user to choose whether or not to clear the context if encounter this error. For now, if I can find another solution, I will implement it later

from poe-api-wrapper.

johnd0e avatar johnd0e commented on May 20, 2024

Thank you!

from poe-api-wrapper.

snowby666 avatar snowby666 commented on May 20, 2024

This is temp fixed in the new version. The stability is improved but there may be some unexpected errors in the future.

from poe-api-wrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.