karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.06k stars 116 forks source link

Error in process sentinel #82

Closed Ypot closed 7 months ago

Ypot commented 1 year ago

Hi I am receiving this error:

Querying ChatGPT...
error in process sentinel: gptel-curl--stream-cleanup: Search failed: "e82a46bac5b8cbf62fbee31911f58e74"
error in process sentinel: Search failed: "e82a46bac5b8cbf62fbee31911f58e74"

Could it be the same as this, that appears when gptel-use-curl is nil?: ChatGPT response error: ((HTTP/1.1 429 Too Many Requests) insufficient_quota) You exceeded your current quota, please check your plan and billing details.

Ypot commented 1 year ago

OK. I added a billing account, and it works.

Thanks, my first time with chatgpt on emacs!!!!

Ypot commented 1 year ago

OK. Those were 2 different errors. curl still not working:

curl: option --compressed: the installed libcurl version doesn't support this
curl: try 'curl --help' for more information

Is it much better to use curl?

karthink commented 1 year ago

Yes, the Curl version is a much better experience.

I'm reopening this until I fix support for older versions of Curl.

Ypot commented 1 year ago

I have tried updating curl:

I updated curl.exe in this way:

To:

C:\Windows\System32>curl --version
curl 8.1.2 (x86_64-w64-mingw32) libcurl/8.1.2 OpenSSL/3.1.0 (Schannel) zlib/1.2.13 brotli/1.0.9 zstd/1.5.5 WinIDN libssh2/1.11.0 nghttp2/1.54.0 ngtcp2/0.15.0 nghttp3/0.11.0 libgsasl/2.2.0
Release-Date: 2023-05-30
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli gsasl HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL SSPI threadsafe UnixSockets zstd
karthink commented 12 months ago

@Ypot Could you run (setq gptel--debug t) and then try using gptel with Curl enabled? A window should pop up with Curl errors. Please paste that text here.

Ypot commented 12 months ago

The buffer gptel-error says:

(bf3c8270782ce518a17359167283e6a8 . 0)

But it changes each time, for example, for the same interaction: (bf036a8bce0012bb0ee26dc2e09d9cd5 . 0)

unhammer commented 9 months ago

I get the same (longhash . 0) in gptel-error with (setq gptel-use-curl t) and curl 8.1.1.

If I (setq gptel-use-curl nil) then I see:

HTTP/1.1 400 Bad Request
Date: Wed, 18 Oct 2023 12:03:36 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 443
Connection: keep-alive
vary: Origin
x-request-id: 03838e35364af0f8e69c86b4bf055fe0
strict-transport-security: max-age=15724800; includeSubDomains
CF-Cache-Status: DYNAMIC
Server: cloudflare
CF-RAY: 8180a3947ff05696-OSL
alt-svc: h3=":443"; ma=86400

{
    "error": {
        "message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)",
        "type": "invalid_request_error",
        "param": null,
        "code": null
    }
}

(as if url-request-data was empty?) This is on emacs 29.1

karthink commented 7 months ago

The main issue with Curl in Windows is that the --compressed flag is not supported, leading to errors like this one. This has been addressed in #143, and problems with setting the curl path in Windows are being addressed in #145. I'm closing this issue now, feel free to re-open if the bug persists.