Comments (18)
Hi Jon,
I renamed some functions recently to appease the byte-compiler and linter. Could you try uninstalling (package-delete
) and reinstalling (package-install-file
on the directory) this package and running a fresh Emacs session? Or equivalent if you're using Straight/Elpaca/some other package manager or loading files manually.
from gptel.
Hi,
I did a straight-pull-package
, I hope that's equivalent.. I'm on doom so
that's usually abstracted away for me :)
Now I get the following error on startup:
Debugger entered--Lisp error: (no-catch emacs-version-changed nil)
throw(emacs-version-changed nil)
(if (equal (emacs-version) "GNU Emacs 28.1.90 (build 2,
x86_64-w64-mingw32)\n o...") nil (throw 'emacs-version-changed nil))
(unless (equal (emacs-version) "GNU Emacs 28.1.90 (build 2,
x86_64-w64-mingw32)\n o...") (throw 'emacs-version-changed nil))
eval((unless (equal (emacs-version) "GNU Emacs 28.1.90 (build 2,
x86_64-w64-mingw32)\n o...") (throw 'emacs-version-changed nil)))
byte-code("\300\301\302\303\304E\305BB!\207" [eval unless equal
(emacs-version) "GNU Emacs 28.1.90 (build 2, x86_64-w64-mingw32)\n o..."
((throw 'emacs-version-changed nil))] 5)
(straight-use-package '(gptel :host github :repo "karthink/gptel"))
load-with-code-conversion("c:/Users/Jonathan/.doom.d/config.el"
"c:/Users/Jonathan/.doom.d/config.el" nil t)
load("/.doom.d/config" nil nomessage)/.doom.d/config")
(condition-case e (load path noerror 'nomessage) ((debug doom-error)
(signal (car e) (cdr e))) ((debug error) (setq path (locate-file path
load-path (get-load-suffixes))) (signal (cond ((not (and path (featurep
...))) 'error) ((file-in-directory-p path (expand-file-name "cli"
doom-core-dir)) 'doom-cli-error) ((file-in-directory-p path doom-core-dir)
'doom-core-error) ((file-in-directory-p path doom-user-dir)
'doom-user-error) ((file-in-directory-p path doom-profile-dir)
'doom-profile-error) ((file-in-directory-p path doom-modules-dir)
'doom-module-error) ('doom-error)) (list path e))))
doom-load("
from gptel.
I'm not sure how you're expected to update packages when using Doom, but I'm guessing straight-pull-all
is not the way? It will probably break stuff.
from gptel.
Thanks for your work on this. I have the exact same problem.
I tried quitting Emacs and re-installing. I'm managing the package manually as described in your README:
(add-to-list 'load-path "/path/to/gptel/")
(require 'gptel)
When running Emacs again, I still had the same error. That's when I set M-x customize-group
→ Gptel Use Curl
: off
and now I'm able to use the package.
I'm on PopOS and running Emacs in the Terminal. Let me know what else I can do to help debug.
from gptel.
from gptel.
I'm on PopOS and running Emacs in the Terminal. Let me know what else I can do to help debug.
Could you run (setq gptel--debug t)
and try using it with Curl? The HTTP response from ChatGPT should pop up in a buffer. If it doesn't that's helpful too. There are multiple silent-failure bugs (possibly related) that I'm trying to reproduce here.
from gptel.
@JonatanSahar Is curl + gptel still a problem for you?
from gptel.
from gptel.
@JonatanSahar Is this still an issue?
from gptel.
from gptel.
from gptel.
I'm on PopOS and running Emacs in the Terminal. Let me know what else I can do to help debug.
Could you run
(setq gptel--debug t)
and try using it with Curl? The HTTP response from ChatGPT should pop up in a buffer. If it doesn't that's helpful too. There are multiple silent-failure bugs (possibly related) that I'm trying to reproduce here.
I removed my custom install and switched to the MELPA package (GPTEL 0.3.6) using package-list-package
. I'm using the same Emacs/Pop_OS as I wrote the last time (GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2022-01-24, modified by Debian
) and it doesn't work. So - per your suggestion - I ran (setq gptel--debug t)
and got this response:
HTTP/1.1 400 Bad Request
Date: Mon, 19 Jun 2023 19:23:36 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 167
Connection: keep-alive
vary: Origin
x-request-id: 3bd93220eb6f16ba4f081a0798b27431
strict-transport-security: max-age=15724800; includeSubDomains
CF-Cache-Status: DYNAMIC
Server: cloudflare
CF-RAY: 7d9e25c08b4f3755-MXP
alt-svc: h3=":443"; ma=86400
{
"error": {
"message": "you must provide a model parameter",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
I'm running vanilla Emacs, but perhaps the compile log will lend some insights into what is special about the system:
Leaving directory ‘/home/schmudde/.emacs.d/elpa/gptel-0.3.6’
Compiling file /home/schmudde/.emacs.d/elpa/gptel-0.3.6/gptel-curl.el at Mon Jun 19 21:17:01 2023
Entering directory ‘/home/schmudde/.emacs.d/elpa/gptel-0.3.6/’
In gptel-curl--get-args:
gptel-curl.el:53:46:Warning: ‘token’ is an obsolete variable (as of 25.1); use
'token instead
In gptel-curl-get-response:
gptel-curl.el:78:63:Warning: ‘token’ is an obsolete variable (as of 25.1); use
'token instead
gptel-curl.el:84:33:Warning: ‘token’ is an obsolete variable (as of 25.1); use
'token instead
In gptel-abort:
gptel-curl.el:109:56:Warning: ‘buf’ is an obsolete variable (as of 25.1); use
'buf instead
gptel-curl.el:117:30:Warning: ‘buf’ is an obsolete variable (as of 25.1); use
'buf instead
gptel-curl.el:120:72:Warning: ‘buf’ is an obsolete variable (as of 25.1); use
'buf instead
gptel-curl.el:120:72:Warning: ‘buf’ is an obsolete variable (as of 25.1); use
'buf instead
gptel-curl.el:123:1:Warning: Unused lexical argument ‘status’
gptel-curl.el:175:1:Warning: Unused lexical variable ‘status-str’
gptel-curl.el:203:1:Warning: Unused lexical variable ‘content-str’
gptel-curl.el:203:1:Warning: Unused lexical variable ‘response’
gptel-curl.el:262:1:Warning: Unused lexical argument ‘status’
In gptel-curl--parse-response:
gptel-curl.el:287:24:Warning: ‘buf’ is an obsolete variable (as of 25.1); use
'buf instead
gptel-curl.el:290:24:Warning: ‘token’ is an obsolete variable (as of 25.1);
use 'token instead
Compiling file /home/schmudde/.emacs.d/elpa/gptel-0.3.6/gptel-transient.el at Mon Jun 19 21:17:01 2023
gptel-transient.el:89:72:Warning: ‘buf’ is an obsolete variable (as of 25.1);
use 'buf instead
gptel-transient.el:90:52:Warning: ‘buf’ is an obsolete variable (as of 25.1);
use 'buf instead
Compiling file /home/schmudde/.emacs.d/elpa/gptel-0.3.6/gptel.el at Mon Jun 19 21:17:02 2023
gptel.el:69:1:Warning: defgroup for ‘gptel’ fails to specify containing group
In gptel--stream-convert-markdown->org:
gptel.el:718:50:Error: missing value for ‘in-src-block’ at end of setq
from gptel.
(it might be helpful for gptel--debug t
to also show the curl command that is being used so that it's easier to troubleshoot the command in the shell directly? e.g. I've added a small print
before here to show the curl command that is being sent vs only the response + headers -- maybe surrounding that with (when gptel--debug...
could be useful?)
from gptel.
I'm also stuck with you must provide a model parameter
My elisp is very rusty. I put a
(message "curl %s" args)
on the line before
(with-current-buffer (process-buffer process)
but it does not log anything into *Messages*
.
I'm using version 20230623.2344 from Melpa after the version from March stopped working yesterday. I didn't investigate the reason, I assumed that the API changed (I saw an announcement of new models.) Maybe it changed beyond the reach of the June version too.
from gptel.
@pmontrasio Could you try with with the latest version after running (setq gptel--debug t)
?
from gptel.
I installed from melpa with M-x package-list-packages and the install button
Warning (bytecomp): reference to free variable ‘mc/cmds-to-run-for-all’
Warning (bytecomp): reference to free variable ‘mc/cmds-to-run-once’
Warning (bytecomp): reference to free variable ‘mc--default-cmds-to-run-for-all’
Warning (bytecomp): reference to free variable ‘mc--default-cmds-to-run-once’
Leaving directory ‘/home/me/.emacs.d/elpa/gptel-20230721.433’
Compiling file /home/me/.emacs.d/elpa/gptel-20230721.433/gptel-curl.el at Fri Jul 21 12:05:27 2023
Entering directory ‘/home/me/.emacs.d/elpa/gptel-20230721.433/’
Compiling file /home/me/.emacs.d/elpa/gptel-20230721.433/gptel-transient.el at Fri Jul 21 12:05:27 2023
Compiling file /home/me/.emacs.d/elpa/gptel-20230721.433/gptel.el at Fri Jul 21 12:05:27 2023
In gptel--stream-convert-markdown->org:
gptel.el:872:50:Error: missing value for ‘in-src-block’ at end of setq
Then (setq gptel--debug t)
in *scratch*
Then M-x gptel
I sent Hi
and got
HTTP/2 400
date: Fri, 21 Jul 2023 10:07:13 GMT
content-type: application/json; charset=utf-8
content-length: 167
vary: Origin
x-request-id: 86954ccda2298e8603fb1be855f497c1
strict-transport-security: max-age=15724800; includeSubDomains
cf-cache-status: DYNAMIC
server: cloudflare
cf-ray: 7ea2a2b95f7a0e1d-MXP
alt-svc: h3=":443"; ma=86400
{
"error": {
"message": "you must provide a model parameter",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
(8aa2385e00ebb7c86714e7022a2f6df1 . 352)
I made other attempts with several combinations of the setq
command, closing the ChatGPT buffer, opening it. Always the same outcome.
from gptel.
Is this error still present in the latest version of gptel?
from gptel.
I am closing this now since gptel has changed significantly in the past few months. Feel free to re-open if the error still persists.
from gptel.
Related Issues (20)
- gptel-org-branching-context requires Org 9.7 (unreleased) HOT 6
- Watermarking / inline annotation of LLM generated content vs prompt content HOT 2
- Org mode response formatting HOT 8
- Ollama as default backend HOT 1
- Perplexity: citations HOT 14
- Different results between gptel+ChatGPT and chat.openai.com HOT 2
- Auto Fill mode should be respected HOT 4
- Wrong language in the source block header HOT 4
- Help using local backends HOT 2
- Interacting with privateGPT (specifically for RAG) HOT 10
- Is it possible to interact with LLMs provided by an Open WebUI? HOT 1
- Error with the local LLM scripts in init file HOT 5
- How to disable the highlight after its done generating HOT 9
- How to register additional backends in doom emacs? HOT 5
- Enhance `gptel` to allow selecting from list of existing gptel buffers, when called interactively HOT 1
- [enhancement] Provide information about the different models HOT 1
- Updating `DoomEmacs`/`gptel` and chaing lightly configuration => only garbage generated now... HOT 8
- (gptel-menu) Truncated width of system message is wrong
- Better prefix-arg behavior for M-x gptel
- gptel-request wrong type argument HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gptel.