Skip to content

Some opinionated ideas and refactoring#8

Draft
akirakyle wants to merge 12 commits into
jwiegley:mainfrom
akirakyle:main
Draft

Some opinionated ideas and refactoring#8
akirakyle wants to merge 12 commits into
jwiegley:mainfrom
akirakyle:main

Conversation

@akirakyle

@akirakyle akirakyle commented Dec 4, 2025

Copy link
Copy Markdown

Since I live in org mode and heavily use babel for literate programming I was excited to use it to integrate llm workflows into emacs in a way that's very familiar to me. As I was playing around with getting this set up, I was hitting some snags trying to get exactly requests I wanted. Over the course of trying to understand the code I ended up refactoring a fair bit to try to reason about the complex interactions between all the ways to set prompts, contexts, and generally all the gptel-* variables that implicitly affect a gptel-request. Anyways I thought I would just open this as a draft PR to get some visibility in case others are experimenting with this type of workflow and interested in any of these changes. A summary of what's here (or at least what I intended to be here):

  • trying to make the babel src block arguments take precedence (either adding or overriding) over the global or per-buffer options that can be set from gptel-menu or in one's init
  • removed the markdown to org conversion as I believe the models understand org mode markup fairly well and can output it semi-correctly if prompted correctly. With the output contained in a results drawer, org mode should do a reasonable-ish job of making sure any broken markup is contained
  • added a :media header option and changed the gptel src block to org-mode so that org mode file links can have their contents included in a request if set to t
  • Added tool use using changes from PR Add tool-use support to enable LLM function calling #7
  • Removed the broken variable assignment code as I wasn't sure exactly what the usecase or ui should look like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant