A (nearly) seamless integration of ChatGPT into Obsidian.
https://user-images.githubusercontent.com/3282661/223005882-6632c997-b9a6-445b-800c-77a4b76a6325.mov
<hr class="__chatgpt_plugin">
and role::system|assistant|user
The main command! Parses the file and calls ChatGPT. Recommended to add to a hotkey for easy usage.
Take currently highlighted text and default frontmatter and create a new chat file in Chat Folder
Create a new chat file from a template specified in Chat Template Folder
. Remember to check out chatgpt-md-templates for some templates!
Infer the title of the chat from the messages. Requires at least 2 messages. Can be set in settings to run automatically after >4 messages.
Add a comment block to the editor that will not be processed by ChatGPT. Allows you to leave scratchpad notes, backlinks...or anything else really!
Comments begin with =begin-chatgpt-md-comment
and end with =end-chatgpt-md-comment
Removes all messages but leaves frontmatter
Stops the stream. Useful if you want to stop the stream if you don't like where ChatGPT is heading/going too long.
Add a ChatGPT MD Horizontal Rule and role::user
.
!! Note: both role::system|assistant|user
AND <hr class="__chatgpt_plugin">
are REQUIRED for the plugin to work!!
Go to Community Plugins and search ChatGPT MD
plugins
directory in your vaultnpm i
and npm run build
Chat Folder
and Chat Template Folder
Chat
(Im using alt-[
)To address this, first try to increase your max_tokens
(default is set to 300). You may also want to update it more permanently in the default frontmatter settings. See pics below:
The Obsidian editor renders backticks in automatically (see issue) and fires extra logic that causes the stream to add extra backticks. To address this, you can:
<hr>
and delete the three extra Obsidian added automatically.role::user
write "keep going"See pics below:
If you are off the waitlist, simply replace model: gpt-3.5-turbo
with model: gpt-4
in the frontmatter. (note: gpt-4 is slower than turbo!)
---
system_commands: ['I create small self contained app ideas that could fit in a CodePen or a Replit']
url: https://localhost
---
The custom API must conform to the OpenAI API spec. eg you could use Azure's OpenAI hosted endpoints here. Refer to your provider for API key handling.
This repository was written by Bram Adams, a writer and programmer based out of NYC.
Bram publishes a weekly newsletter, is a community developer ambassador for OpenAI, and does freeleance contracts (for hire!) related to AI/web dev/AR+VR.
As of Fall 2023, Bram is actively working on Commonplace Bot, a novel and modern look into how LLMs and creative coding can help us capture, engage, and creatively remix the best pieces of information we come across. You can test it out live in the Bram Adams' Discord server.
Bram is the creator of Stenography, an API and VSC Extension that automatically documents code on save, which went #1 on Product Hunt. He also is the author of Bramses' Highly Opinionated Vault, an extremely detailed philosophy + vault template used by thousands of Obsidian users (new and old!), and ChatGPT MD, a (nearly) seemless integration of Chat GPT into Obsidian which has been downloaded by over twenty thousand Obsidian users. He also taught the GPT-3 in Production Course for O'Reilly Media, teaching students how to leverage LLMs in the real world of production.
Previously Developer Advocate @ Algolia, Software Engineer @ HBO, Computer Science B.S. @ University of Rochester
You can learn more about him and his work on his website.
The best way to support his work is to sign up for his newsletter here.