Skip to content

Trouble with gptel-post-response-functions hook #1163

@Hamzehn

Description

@Hamzehn

Please update gptel first -- errors are often fixed by the time they're reported.

  • I have updated gptel to the latest commit and tested that the issue still exists

Bug Description

I'm seeing the behavior below on versions 0.9.9 (latest package available in Doom Emacs) and 0.9.9.3 (installed manually using package-install):

I added the two recommended hooks in my config:

(add-hook 'gptel-post-stream-hook 'gptel-auto-scroll)
(add-hook 'gptel-post-response-functions 'gptel-end-of-response)

The issue I'm seeing is that when I do gptel-send, the cursor is moved to the end of the response instead of the placeholder for the next prompt. If instead of using the hook I call the gptel-end-of-response function manually, it moves to the correct location (after the three ###).

Image

Backend

None

Steps to Reproduce

  1. Add gptel-end-of-response to the gptel-post-response-functions hook like this in the config file:

(add-hook 'gptel-post-response-functions 'gptel-end-of-response)

  1. Open a GPTel window to use an LLM (e.g. ChatGPT) and type a prompt and hit C-c RET (or gptel-send).
  2. The cursor will not move to the next prompt and instead will move to the end of the response text.

Additional Context

Doom Emacs (Emacs 30)
Running on Ubuntu (WSL2)

Backtrace

Log Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions