Skip to content

gptel: Add describe-gptel-model feature #706

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pabl0
Copy link
Contributor

@pabl0 pabl0 commented Mar 15, 2025

The new describe-gptel-model command displays model information in the *Help* buffer in similar fashion as describe-package. This naming convention aligns with Emacs Lisp coding conventions documented in the elisp info manual (I believe). The command is accessible via M-x or the transient menu (bound to h).

Several new keys have been added to model definitions. A future enhancement could be to add more details, such as cache-hit # and web URLs.

The model selection completion for the -m option could benefit from removing some details to improve readability, particularly on smaller screens, if you agree with this new feature.

* gptel.el (gptel--openai-cost-url, gptel--openai-models): Add
:cost-url for OpenAI # web page.

* gptel.el (describe-gptel-model): New function to display a
description of a gptel model in *Help* buffer.

* gptel-anthropic.el (gptel--anthropic-cost-url,
gptel--anthropic-models): Add :cost-url for Claude # web page.
Add :max-output for maximum output tokens.

* gptel-openai-extras.el (gptel-make-deepseek): Add
:cost-url and :max-output for DeepSeek.

* gptel-transient.el (gptel-menu): Add new subsection "Info"
and a new command "Describe model" (bound to `h') to describe
the current selected model.
@pabl0
Copy link
Contributor Author

pabl0 commented Mar 16, 2025

Hmm I think I've misunderstood the streaming bit. It should be detected per-model from :request-params having :stream?
(#710)

@karthink
Copy link
Owner

karthink commented Apr 7, 2025

Will take a look soon, thanks for the PR.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants