whatsapp-gpt icon indicating copy to clipboard operation
whatsapp-gpt copied to clipboard

500 error, need some help

Open tony6012 opened this issue 1 year ago • 6 comments

https://imgur.com/a/nngakIm

having a seems common issue. please check link [https://imgur.com/a/nngakIm] error

tony6012 avatar May 23 '23 21:05 tony6012

i have the same problem in this day

ItZTheNicasio avatar May 24 '23 00:05 ItZTheNicasio

The Whatsapp Client get a connection refused, about postman the api is available.

Error making request: Get "http://localhost:5001/chat?q=AwesomeQuestion dial tcp [::1]:5001: connect: connection refused

Huskynarr avatar May 26 '23 11:05 Huskynarr

same

Youssof68 avatar May 28 '23 12:05 Youssof68

https://github.com/danielgross/whatsapp-gpt/issues/79 ?

MeinDeutschkurs avatar May 29 '23 05:05 MeinDeutschkurs

Got solved this problem with relogin in whatsapp. Am currently unsure if it really is. Maybe the token expires after 30 days and the error handling is not correct. But that's just a guess.

Huskynarr avatar Jun 01 '23 14:06 Huskynarr

@Huskynarr That's interesting. Do you mean that you simply "renew" the qr-code-thing, or did you change anything in server.py for this?

As mentioned before, I do a reload of the browser window before submitting new requests to it. To avoid overwriting the content by new requests, I copied the part which checks the streaming-class before the reload, so other requests have to wait until the class vanishes. (First serve first come?)

def send_message(message):
    # Send the message
    # Refresh the page before sending the message
    while PAGE.query_selector(".result-streaming") is not None:
        time.sleep(0.1)
    PAGE.reload()
    # Wait for 6 seconds
    time.sleep(6)
    # Send the message
    box = get_input_box()
    box.click()
    box.fill(message)
    time.sleep(2)
    box.press("Enter")
    while PAGE.query_selector(".result-streaming") is not None:
        time.sleep(0.1)

However, I added Apple "say" to have voice output and whisper AI to detect voice messages. It's funny. Next I want to try to OCR my student's homework from PDF-files and/or images. I also want to add scraped google results to get a bit of web context.

MeinDeutschkurs avatar Jun 02 '23 00:06 MeinDeutschkurs