Загрузка...

Emacs lisp and gptel building custom llm tools to call emacs functions

Using Emacs with the gptel package we can create gpt-tools for llms that call emacs functions to provide the llm with information about our emacs set up

i was thinking couldnt you write emacs gptel-tools for llms and did a quick search and came across the emacs-mcp mcp server which wasnt quite what i was after.

so i refactored the code from the emacs-mcp package into the gptel-tool format for use with the gptel package and llms that support tool usage like llama and gemini

i created a gptel-custom-tools.el file with 32 gptel-tools for emacs which can be loaded using the gptel use package code block

the gptel-tools allow the llm to report the state of your emacs set up by listing installed packages, modes and variables. as well as reading the manuals and looking up docstrings for elisp symbols

refactored from mpontus emacs-mcp package

emacs-mcp
https://github.com/mpontus/emacs-mcp

gptel-custom-tools.el
https://github.com/NapoleonWils0n/nixos-dotfiles/blob/master/.config/emacs/lisp/gptel-custom-tools.el

early-init.el
https://github.com/NapoleonWils0n/nixos-dotfiles/blob/master/.config/emacs/early-init.el

init.el
https://github.com/NapoleonWils0n/nixos-dotfiles/blob/master/.config/emacs/init.el

ollama
https://ollama.com/library/llama3.1
https://ollama.com/library/llama3.2

dotfiles org mode
https://github.com/NapoleonWils0n/nixos-dotfiles/blob/master/nixos-dotfiles.org

https://github.com/NapoleonWils0n/nixos-dotfiles/blob/master/nixos-dotfiles.org#auth-source

https://github.com/NapoleonWils0n/nixos-dotfiles/blob/master/nixos-dotfiles.org#lisp-directory

https://github.com/NapoleonWils0n/nixos-dotfiles/blob/master/nixos-dotfiles.org#gptel-custom-toolsel

Видео Emacs lisp and gptel building custom llm tools to call emacs functions канала NapoleonWils0n
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять