Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support noweb #46

Merged
merged 6 commits into from
May 11, 2023
Merged

Support noweb #46

merged 6 commits into from
May 11, 2023

Conversation

togakangaroo
Copy link
Contributor

I want to be able to template values into org-ai blocks and turns out pretty straightforward to add support for noweb blocks.

README excerpt:
Given a named source block

#+name: sayhi
#+begin_src shell 
echo "Hello there"
#+end_src

We can try to reference it by name, but it doesn't work.

#+begin_ai 
[SYS]: You are a mimic. Whenever I say something, repeat back what I say to you. Say exactly what I said, do not add anything.

[ME]: <<sayhi()>>


[AI]: <<sayhi()>>

[ME]: 
#+end_ai

With :noweb yes

#+begin_ai :noweb yes
[SYS]: You are a mimic. Whenever I say something, repeat back what I say to you. Say exactly what I said, do not add anything.

[ME]: <<sayhi()>>


[AI]: Hello there.

[ME]: 
#+end_ai

@togakangaroo
Copy link
Contributor Author

This is an MVP. Next I feel like I should implement some settable global defaults and a view-what-the-codeblock-expands-to mode

@rksm rksm merged commit aee1de7 into rksm:master May 11, 2023
@rksm
Copy link
Owner

rksm commented May 11, 2023

Nifty, thank you!

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.

None yet

2 participants