Commit graph

60 commits

Author SHA1 Message Date
Karthik Chikmagalur
c6abda6f0f gptel-transient: Rename gptel-send-menu -> gptel-menu
* gptel.el (gptel-send): Replace references to `gptel-send-menu'.

* gptel-transient.el: Rename `gptel-send-menu' t `gptel-menu'.
This shorter name is apropos of its increased feature set (in the
forthcoming commits).
2023-04-09 04:14:37 -07:00
Karthik Chikmagalur
9b3db255e8 gptel: Turn API parameters into defcustoms
* gptel.el (gptel--request-data, gptel--system-message-alist,
gptel--model, gptel--temperature, gptel--max-tokens): Rename API
parameters and turn them into customizable variables. They are
still buffer-local.

Rename:
`gptel--system-message-alist' to `gptel-directives'
`gptel--max-tokens' to `gptel-max-tokens'
`gptel--model' to `gptel-model'
`gptel--temperature' to `gptel-temperature'

* gptel-transient.el (gptel-system-prompt,
gptel--infix-max-tokens, gptel--infix-model,
gptel--infix-temperature): Accommodating changes when setting the
renamed parameters.
2023-03-24 17:51:00 -07:00
Schroedi
23caab41cf Add gpt-4 model 2023-03-23 14:27:33 -07:00
Karthik Chikmagalur
8a6ef565f0 gptel-transient: Remove unused lexical vars 2023-03-17 23:44:17 -07:00
Karthik Chikmagalur
30161850ad gptel-transient: Allow setting num past messages to 0
gptel-transient.el (gptel--infix-num-messages-to-send): Allow
setting the number of past messages to send to 0 for no-context
responses.
2023-03-14 02:09:53 -07:00
Karthik Chikmagalur
3d0df72bd3 gptel-transient: linting for MELPA 2023-03-12 14:51:07 -07:00
Karthik Chikmagalur
cd6d90b24d gptel-transient: Improve "send in existing/new session" option
gptel-transient.el (gptel-send-menu, gptel--suffix-send-existing,
gptel--suffix-send-new, gptel--infix-model): Make menu keybindings
more uniform and improve descriptions. Suffixes to send queries in
existing/new sessions will now automatically send them instead of
just yanking the text into these sessions.
2023-03-11 18:40:06 -08:00
Karthik Chikmagalur
9da22155de gptel-transient: Fix autoloads for gptel-send-menu 2023-03-11 02:09:01 -08:00
Karthik Chikmagalur
9f8fc0e519 gptel-transient: Commands to act on region
gptel.el (gptel): When calling `gptel' with a selected region, insert it
into a new session.

gptel-transient.el (gptel--suffix-send-existing,
gptel--suffix-send-new): Transient suffixes available when a region is
selected.  These send the text as a prompt in a existing or new gptel
session.
2023-03-10 06:14:46 -08:00
Karthik Chikmagalur
39376aa3f4 gptel-transient: Add transient menus for setting parameters
gptel-transient (gptel-send-menu): Add new transient-prefix
`gptel-send-menu' for setting API options for the buffer
and (optionally) sending queries. Various infix options are supported.

2023-03-09: Some transient menus are generated dynamically, which
requires a more recent version of transient than the latest tagged
release. As a result, the dynamic generation code is commented out for
now.
2023-03-10 06:13:19 -08:00