Commit graph

57 commits

Author SHA1 Message Date
Karthik Chikmagalur
88995a6436 gptel-curl: Add curl module and playback feature.
Conditionally solves #2.

gptel.el (gptel-use-curl, gptel-parse-response, gptel--playback,
gptel-send, gptel-playback): New user options `gptel-playback',
`gptel-use-curl`. The former controls whether the response is played
back in chunks, which is done by the function `gptel--playback'. The
response returned by `gptel-get-response' and `gptel--curl-get-response'
is now a plist with the content and status.

gptel-curl.el (gptel--curl-get-args, gptel--curl-get-response,
gptel--curl-sentinel): Add support for curl when available.  Set it to
the default. `url-retrieve' is full of fangs that multibyte you.
2023-03-08 01:22:14 -08:00
Karthik Chikmagalur
33d8434f3e gptel: Tweak header line format
Add a status indicator to the header line.
2023-03-06 00:58:32 -08:00
Karthik Chikmagalur
a5fe30312f gptel: Fix spacing issues in response 2023-03-05 18:56:41 -08:00
Karthik Chikmagalur
86bf0c9f74 gptel: Avoid logging url-retrieve messages
- Use `read-passwd' to read the API key.
2023-03-05 18:43:49 -08:00
Karthik Chikmagalur
deeb606409 Update license.
Also update README.
2023-03-05 18:13:32 -08:00
Karthik Chikmagalur
cf6999ac12 Fix byte-compile warnings 2023-03-05 18:13:32 -08:00
Karthik Chikmagalur
99aa8dcc5f Add gptel.el and a README. 2023-03-05 18:13:32 -08:00