Package: gptel

Defined variables (79)

gptel--token-usage-stringsToken usage strings formatted for display.
gptel-pre-response-hookHook run before inserting the LLM response into the current buffer.
gptel-modeNon-nil if GPTel mode is enabled.
gptel--backend-nameStore to persist backend name across Emacs sessions.
gptel-crowdsourced-prompts-fileFile used to store crowdsourced system prompts.
gptel-send--handlersAlist specifying handlers for `gptel-send' state transitions.
gptel--tool-preview-alistAlist mapping tool names to preview functions for tools.
gptel-use-header-lineWhether `gptel-mode' should use header-line for status information.
gptel-tool-call-inspection-mapActions in the gptel tool inspection buffer.
gptel--header-line-infoInformation segment for the header-line in `gptel-mode'.
gptel-highlight-methodsTypes of LLM response highlighting used by `gptel-highlight-mode'.
gptel-post-response-hookPost-response functions are now called with two arguments: the
gptel-send--transitionsAlist specifying state transitions for `gptel-send'.
gptel--fsm-lastState machine for latest request in the buffer.
gptel-pre-tool-call-functionsAbnormal hook called before each tool call.
gptel-mode-mapKeymap for `gptel-mode'.
gptel-refresh-buffer-hookHook run in gptel buffers after changing gptel's configuration.
gptel--markdown-block-mapKeymap for folding and unfolding Markdown code blocks.
gptel--known-presetsAlist of presets for gptel.
gptel-default-modeThe default major mode for dedicated chat buffers.
gptel--token-usageToken usage details for gptel.
gptel-mode-hookHook run after entering or leaving `gptel-mode'.
gptel-save-state-hookHook run before gptel saves model parameters to a file.
gptel-post-stream-hookHook run after each insertion of the LLM's streaming response.
gptel-highlight-mode-hookHook run after entering or leaving `gptel-highlight-mode'.
gptel-post-tool-call-functionsAbnormal hook called after each tool call.
gptel--presetName of last applied gptel preset.
gptel-tool-call-actions-mapKeymap for actions on tool calls.
gptel--tool-namesStore to persist tool names to file across Emacs sessions.
gptel-display-buffer-actionThe action used to display gptel chat buffers.
gptel-highlight-modeNon-nil if Gptel-Highlight mode is enabled.
gptel-post-response-functionsAbnormal hook run after inserting the LLM response into the current buffer.
gptel-curl-extra-argsExtra arguments to pass to Curl when sending queries.
gptel--request-alistAlist of active gptel requests.
gptel-modelModel for gptel queries.
gptel-use-contextWhere in the request to inject gptel's additional context.
gptel-include-reasoningHow to handle LLM reasoning or "thinking" text blocks.
gptel--link-type-cacheCache of checks for binary files.
gptel--mode-description-alistMapping from unconventionally named major modes to languages.
gptel-curl-file-size-thresholdSize threshold for using file input with Curl.
gptel-org-convert-responseWhether gptel should convert Markdown responses to Org markup.
gptel-include-tool-resultsWhether tool call results should be included in the buffer.
gptel-track-responseDistinguish between user messages and LLM responses.
gptel-cacheWhether the LLM should cache request content.
gptel-proxyPath to a proxy to use for gptel interactions.
gptel--schemaResponse output schema for backends that support it.
gptel-log-levelLogging level for gptel.
gptel-toolsA list of tools to include with gptel requests.
gptel-use-toolsWhether gptel should use tools.
gptel-request--transitionsAlist specifying gptel's default state transition table for requests.
gptel-context--alistList of gptel's context sources.
gptel-prompt-prefix-alistString used as a prefix to the query being sent to the LLM.
gptel--system-messageSystem prompt used by gptel.
gptel-system-promptSystem prompt used by gptel.
gptel-post-request-hookHook run after sending a gptel request.
gptel-markdown--link-regexLink regex for `gptel-mode' in Markdown mode.
gptel--log-buffer-nameLog buffer for gptel.
gptel-track-mediaWhether links to supported media types should be followed.
gptel--known-toolsAlist of gptel tools arranged by category.
gptel-streamStream responses from the LLM as they are received.
gptel-prompt-transform-functionsHandlers to augment or transform a query before sending it.
gptel--known-backendsAlist of LLM backends known to gptel.
gptel-api-keyAn API key (string) for the default LLM backend.
gptel-confirm-tool-callsWhether tool calls should wait for the user to run them.
gptel-max-tokensMax tokens per response.
gptel-prompt-filter-hookHandlers to augment or transform a query before sending it.
gptel-expert-commandsWhether experimental gptel options should be enabled.
gptel-response-prefix-alistString inserted before the response from the LLM.
gptel-markdown-validate-linkValidate links to be sent as context with gptel queries.
gptel-contextList of gptel's context sources.
gptel-use-curlWhether gptel should prefer Curl when available.
gptel--request-paramsExtra parameters sent with each gptel request.
gptel-backendLLM backend to use.
gptel-temperature"Temperature" of the LLM response.
gptel--ersatz-json-toolName of ersatz tool used to force JSON output.
gptel-request--handlersAlist specifying handlers for gptel's default state transitions.
gptel-response-separatorString inserted before responses.
gptel-curl--common-argsArguments always passed to Curl for gptel queries.
gptel-directivesSystem prompts or directives for the LLM.

Defined functions (230)

gptel--get-buffer-bounds()
gptel--save-preset(NAME &optional DESCRIPTION)
gptel-mode(&optional ARG)
gptel-beginning-of-response(&optional BEG END ARG)
gptel--preset-mismatch-value(PRESET-SPEC KEY VAL)
gptel--handle-pre-tool(FSM)
gptel--format-tool-call(NAME ARG-VALUES)
gptel-with-preset(NAME &rest BODY)
gptel--next-variant(&optional ARG)
gptel-use-header-line()
gptel--inspect-reject-tool-calls(&optional _)
gptel-send--steer-relocate(REQ-INFO)
gptel-get-preset(NAME)
gptel--steer-tool-calls(&optional TOOL-CALLS OV INFO)
gptel--update-token-usage(TOKENS &optional TOKENS-FULL)
gptel--inherit-stickiness(BEG END PRE)
gptel--modify-value(ORIGINAL NEW-SPEC)
gptel--restore-state()
gptel--dispatch-tool-calls(CHOICE)
gptel--handle-post-tool(FSM)
gptel-markdown-cycle-block()
gptel--fsm-last(FSM)
gptel--transform-apply-preset(FSM)
gptel-send(&optional ARG)
gptel--ediff(&optional ARG BOUNDS-FUNC)
gptel--restore-props(BOUNDS-ALIST)
gptel--mark-response()
gptel--handle-error(FSM)
gptel-highlight--update(BEG END)
gptel--in-response-p(&optional PT)
gptel--inspect-quit-tool-calls(&optional _)
gptel--accept-tool-calls(&optional TOOL-CALLS OV)
gptel--previous-variant(&optional ARG)
gptel--fontify-preset-keyword(END)
gptel--handle-token-usage(FSM)
gptel--inspect-tool-post-command()
gptel--inspect-steer-tool-calls(&optional _)
gptel--insert-response(RESPONSE INFO &optional RAW)
gptel--tool-steer-p(INFO)
gptel--prettify-preset()
gptel--display-tool-results(TOOL-RESULTS INFO)
gptel-make-preset(NAME &rest KEYS)
gptel(NAME &optional KEY INITIAL INTERACTIVEP)
gptel-send--steer()
gptel--inspect-query(&optional REQUEST-FSM FORMAT)
gptel--attach-response-history(HISTORY &optional BUF)
gptel--preset-syms(PRESET)
gptel--format-token-usage(TOKEN-PLIST)
gptel--annotate-link-clear(&optional BEG END)
gptel--get-response-bounds()
gptel-preset-capf()
gptel--inspect-tool-calls(TOOL-CALLS INFO &optional TOOL-OVERLAY)
gptel--continue-query(&optional COPY)
gptel--display-reasoning-stream(TEXT INFO)
gptel-highlight--fringe-prefix(TYPE)
gptel--save-state()
gptel--get-bounds()
gptel--inspect-accept-tool-calls(&optional _)
gptel-auto-scroll()
gptel-end-of-response(&optional BEG END ARG)
gptel--update-tool-call(FSM)
gptel--fsm-live-p(&optional FSM)
gptel--handle-tool-steer(FSM)
gptel-highlight--decorate(OV &optional VAL)
gptel--handle-post-insert(FSM)
gptel--update-tool-ask(FSM)
gptel-highlight--margin-prefix(TYPE)
gptel--annotate-link(OV LINK-STATUS)
gptel--apply-preset(PRESET &optional SETTER)
gptel--reject-tool-calls(&optional TOOL-CALLS OV)
gptel-curl--stream-insert-response(RESPONSE INFO &optional RAW)
gptel--inspect-fsm(&optional FSM)
gptel--update-wait(FSM)
gptel--display-tool-calls(TOOL-CALLS INFO &optional USE-MINIBUFFER)
gptel--handle-pre-insert(FSM)
gptel-highlight-mode(&optional ARG)
gptel-markdown--annotate-links(BEG END)
gptel--at-response-history-p(&optional PT)
gptel--handle-abort(FSM)
gptel--update-status(MSG &optional FACE)
gptel-curl--get-args(INFO UUID)
gptel--model-capable-p(CAP &optional MODEL)
gptel--make-tool(&rest SPEC)
gptel-tool-include--inliner(INLINE--FORM X)
gptel-backend-header--inliner(INLINE--FORM X)
gptel-backend-name(gptel-backend-name X)
gptel--parse-directive(DIRECTIVE &optional RAW)
gptel-tool-async(gptel-tool-async X)
gptel-backend-curl-args(gptel-backend-curl-args X)
gptel--make-tool-internal
gptel-backend-models--inliner(INLINE--FORM X)
gptel--process-tool-call(FSM TOOL-SPEC TOOL-CALL RESULT)
gptel--inject-prompt(BACKEND DATA NEW-PROMPT &optional POSITION)
gptel-abort(BUF)
gptel--parse-response(BACKEND RESPONSE PROC-INFO)
gptel--model-capabilities(MODEL)
gptel-tool-function--inliner(INLINE--FORM X)
gptel-backend-protocol(gptel-backend-protocol X)
gptel-backend-request-params(gptel-backend-request-params X)
gptel-backend-p(X)
gptel--preprocess-schema(SPEC)
gptel--tool-result-p(INFO)
gptel-make-fsm
gptel--handle-tool-result(FSM)
gptel--make-backend
gptel-prompt-prefix-string()
gptel-tool-args(gptel-tool-args X)
gptel-backend-url(gptel-backend-url X)
gptel-backend-header(gptel-backend-header X)
gptel--model-name(MODEL)
gptel--make-backend--cmacro
gptel-backend-host--inliner(INLINE--FORM X)
gptel--fsm-transition(MACHINE &optional NEW-STATE)
gptel--json-read()
gptel--parse-list-and-insert(PROMPTS)
gptel--at-word-end(&rest BODY)
gptel-backend-protocol--inliner(INLINE--FORM X)
gptel--error-p(INFO)
gptel--dispatch-schema-type(SCHEMA)
gptel--curl-path()
gptel-get-tool(PATH)
gptel-curl--parse-stream(BACKEND PROC-INFO)
gptel--preprocess-tool-args(SPEC)
gptel--get-api-key(&optional KEY)
gptel-tool-category(gptel-tool-category X)
gptel-backend-key(gptel-backend-key X)
gptel--with-buffer-copy(BUF START END &rest BODY)
gptel-tool-args--inliner(INLINE--FORM X)
gptel--insert-file-string(PATH)
gptel-tool-function(gptel-tool-function X)
gptel--url-get-response(FSM)
gptel-backend-coding-system--inliner(INLINE--FORM X)
gptel-backend-request-params--inliner(INLINE--FORM X)
gptel-backend-host(gptel-backend-host X)
gptel-tool-name(gptel-tool-name X)
gptel--inject-media(BACKEND PROMPTS)
gptel-curl--stream-cleanup(PROCESS STATUS)
gptel-backend-name--inliner(INLINE--FORM X)
gptel-curl--get-config-args(INFO)
gptel--model-request-params(MODEL)
gptel--inject-tool-call(BACKEND DATA TOOL-CALL NEW-CALL)
gptel-make-fsm--cmacro
gptel--realize-query(FSM)
gptel--copy-tool(ARG)
gptel-tool-category--inliner(INLINE--FORM X)
gptel--to-string(S)
gptel--request-data(BACKEND PROMPTS)
gptel-fsm-handlers--inliner(INLINE--FORM X)
gptel--parse-list(BACKEND PROMPT-LIST)
gptel-response-prefix-string()
gptel--map-tool-args(TOOL-SPEC ARGS)
gptel--create-prompt-buffer(&optional PROMPT-END)
gptel--make-tool-internal--cmacro
gptel--to-number(VAL)
gptel--strip-mode-suffix(MODE-SYM)
gptel--file-binary-p(PATH)
gptel--intern(S)
gptel--parse-media-links(MODE BEG END)
gptel-fsm-info--inliner(INLINE--FORM X)
gptel--merge-plists(&rest PLISTS)
gptel-tool-include(gptel-tool-include X)
gptel--parse-buffer(BACKEND MAX-ENTRIES)
gptel-make-tool(&rest SLOTS)
gptel--parse-schema(BACKEND SCHEMA)
gptel--fsm-next(MACHINE)
gptel-tool-p(X)
gptel-backend-url--inliner(INLINE--FORM X)
gptel--url-parse-response(BACKEND PROC-INFO)
gptel-fsm-table--inliner(INLINE--FORM X)
gptel--maybe-funcall(FUNC-OR-SYM &rest ARGS)
gptel--process-models(MODELS)
gptel--describe-directive(DIRECTIVE WIDTH &optional REPLACEMENT)
gptel--link-standalone-p(LINK)
gptel-api-key-from-auth-source(&optional HOST USER)
gptel-tool-p--inliner(INLINE--FORM X)
gptel--trim-prefixes(S)
gptel--tool-use-p(INFO)
gptel-backend-key--inliner(INLINE--FORM X)
gptel-fsm-state--inliner(INLINE--FORM X)
gptel--log(DATA &optional TYPE NO-JSON)
gptel-curl--log-response(PROC-BUF PROC-INFO)
gptel--json-encode(OBJECT)
gptel--parse-response-plist-error(RESPONSE)
gptel--create-prompt(&optional PROMPT-END)
gptel-backend-curl-args--inliner(INLINE--FORM X)
gptel--base64-encode(FILE)
gptel--parse-response-error(RESPONSE)
gptel--model-mimes(MODEL)
gptel-backend-stream(gptel-backend-stream X)
gptel-tool-description(gptel-tool-description X)
gptel-tool-name--inliner(INLINE--FORM X)
gptel-curl--get-config(INFO UUID)
gptel--json-read-string(STR)
gptel--with-buffer-copy-internal(BUF START END BODY-THUNK)
gptel-fsm-p--inliner(INLINE--FORM X)
gptel-get-backend(NAME)
gptel-backend-endpoint(gptel-backend-endpoint X)
gptel--parse-tool-results(BACKEND RESULTS)
gptel-backend-p--inliner(INLINE--FORM X)
gptel-request
gptel-copy-fsm(ARG)
gptel--sanitize-model
gptel-curl--stream-filter(PROCESS OUTPUT)
gptel--handle-wait(FSM)
gptel-fsm-p(X)
gptel-backend-coding-system(gptel-backend-coding-system X)
gptel-backend-endpoint--inliner(INLINE--FORM X)
gptel--sum-plists(&rest PLISTS)
gptel--parse-tools(BACKEND TOOLS)
gptel-tool-description--inliner(INLINE--FORM X)
gptel-backend-models(gptel-backend-models X)
gptel-fsm-info(gptel-fsm-info X)
gptel--handle-tool-use(FSM)
gptel-markdown--validate-link(LINK)
gptel--transform-add-context(CALLBACK FSM)
gptel-fsm-state(gptel-fsm-state X)
gptel--handle-post(FSM)
gptel-tool-confirm--inliner(INLINE--FORM X)
gptel-backend-stream--inliner(INLINE--FORM X)
gptel-tool-confirm(gptel-tool-confirm X)
gptel--temp-buffer(BUF)
gptel-curl--sentinel(PROCESS STATUS)
gptel-curl-get-response(FSM)
gptel--copy-backend(ARG)
gptel-fsm-table(gptel-fsm-table X)
gptel--model-mime-capable-p(MIME &optional MODEL)
gptel-fsm-handlers(gptel-fsm-handlers X)
gptel--url-retrieve
gptel-tool-async--inliner(INLINE--FORM X)
gptel-curl--parse-response(PROC-INFO)

Defined faces (2)

gptel-response-fringe-highlightLLM response fringe/margin face when using `gptel-highlight-mode'. To enable response highlights in the fringe, `gptel-highlight-methods' must be set.
gptel-response-highlightFace used to highlight LLM responses when using `gptel-highlight-mode'. To enable this face for responses, `gptel-highlight-methods' must be set.