π A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into Obsidian.
- π GPT-4o Web Search Integration: Experience the power of
gpt-4o-search-preview
- now your conversations can directly access and cite information from the web, bringing real-time knowledge into your notes - Enhanced Model Support: Added compatibility with OpenAI's latest models:
- Reasoning Models: Full support for o1, o3, and o4-mini models designed for complex reasoning tasks
- Next-Gen GPT Models: Access to gpt-4.1 (Flagship GPT model for complex tasks) and gpt-4.5 (Largest and most capable GPT model)
- Better Default Settings: Upgraded from gpt-4o-mini to the more capable but still cost-effective gpt-4.1-mini
- Smart Parameter Handling: Automatically omits breaking parameters when using search models
- Improved Model Filtering: Better filtering of non-chat models from model selection lists
Get started in just a few simple steps:
- Install ChatGPT MD: Go to
Settings > Community Plugins > Browse
, search forChatGPT MD
and clickInstall
. - Add your OpenAI API key: In the plugin settings, add your OpenAI API key and/or install Ollama and local LLMs of your choice.
- Start chatting: Use the
ChatGPT MD: Chat
command (cmd + p
orctrl + p
) to start a conversation from any note.
π‘ Pro tip: Set up a hotkey for the best experience! Go to Settings > Hotkeys
, search for ChatGPT MD: Chat
and add your preferred keybinding (e.g., cmd + j
).
Start chatting, don't worry too much about the more advanced features. They will come naturally :-)
- Interactive conversations:
- Engage directly with ChatGPT, OpenRouter.ai models, and Ollama from any Markdown note, edit questions or responses on-the-fly, and continue the chat seamlessly.
- Privacy & Zero API Costs:
- Use local LLMs via Ollama, keeping your chats on your computer and avoiding API costs.
- Web Access Models:
- Get real-time information from the web with OpenAI's
gpt-4o-search-preview
and Perplexity'sopenrouter@perplexity/llama-3.1-sonar-small-128k-online
(via openrouter.ai).
- Get real-time information from the web with OpenAI's
- Multiple AI Providers:
- Choose from OpenAI, OpenRouter.ai (with access to models like Gemini, Claude, DeepSeek, Llama, Perplexity), or local models via Ollama.
- System Commands:
- Instruct the LLM via system commands to get the best possible answers.
- Link context:
- Provide links to any other note in your vault for added context during conversations with Markdown or Wiki links.
- Per-note Configuration:
- Overwrite default settings via frontmatter for individual notes using params from OpenAI API, OpenRouter.ai, or Ollama API.
- Markdown Support:
- Enjoy full rendering of lists, code blocks, and more from all responses.
- Minimal Setup:
- Utilize your OpenAI API key, OpenRouter.ai API key, or install any LLM locally via Ollama.
- Comment Blocks:
- Ignore parts of your notes using comment blocks.
- Chat Templates:
- Use and share frontmatter templates for recurring scenarios. Explore chatgpt-md-templates.
ChatGPT MD is
- only storing data locally in your vault, with zero tracking and no 3rd party integrations except direct calls to the AI APIs (OpenAI, OpenRouter.ai).
- allowing you to use Ollama, a local LLM installation for offline conversation-based knowledge exploration.
The plugin comes with a well-balanced pre-configuration to get you started immediately.
You can change the global settings or use the local parameters in any note via frontmatter
(start typing ---
in the first line of your note to add properties)
---
system_commands: ['I am a helpful assistant.']
temperature: 0.3
top_p: 1
max_tokens: 300
presence_penalty: 0.5
frequency_penalty: 0.5
stream: true
stop: null
n: 1
model: gpt-4.1-mini
# Service-specific URLs (optional, will use global settings if not specified)
openaiUrl: https://api.openai.com
# openrouterUrl: https://openrouter.ai
# ollamaUrl: http://localhost:11434
---
π‘ Pro tip: Increasing max_tokens
to a higher value e.g. 4096
for more complex tasks like reasoning, coding or text creation.
The default model gpt-4.1-mini
is a good compromise between fast and cheap responses. Change this if you have more complex needs.
You can set and change the model for each request in your note.
Specify the model
property via frontmatter:
for openAI models
---
model: gpt-4o
system_commands: [act as a senior javascript developer]
---
prefix it with local@
for Ollama for local LLMs.
---
model: local@gemma2:27b
temperature: 1
---
The AI responses will keep the used model name in the response title for future reference.
You can find the list of your installed Ollama model names from your terminal via ollama list
or the available openAI model names online on this openAI models page.
Each AI service has its own dedicated URL parameter that can be configured globally in settings or per-note via frontmatter:
---
# For OpenAI
openaiUrl: https://api.openai.com
# For OpenRouter
openrouterUrl: https://openrouter.ai
# For Ollama
ollamaUrl: http://localhost:11434
---
The default URLs are:
- OpenAI:
https://api.openai.com
- OpenRouter:
https://openrouter.ai
- Ollama:
http://localhost:11434
Note: Previous versions used a single url
parameter which is now deprecated. Please update your templates and notes to use the service-specific URL parameters.
Run commands from Obsidian's command pallet via cmd + p
or ctrl + p
and start typing chatgpt
or set hotkeys
(a chat command hotkey is highly recommended for effortless chats (I use cmd + j
, which works fantastic, because your index finger is already resting on that key)).
- Chat: Parse the file and interact with ChatGPT. Assign a hotkey, e.g.
cmd + j
.
- New Chat with Highlighted Text: Start a chat using highlighted text and default frontmatter in
Chat Folder
. - New Chat From Template: Create chats from templates in
Chat Template Folder
.
- Infer Title: Automatically generate a note title based on the notes content. Configurable to auto-run after 4+ messages.
- Add Comment Block: Insert comment blocks for parts of your note that should be ignored.
- Select Model: Choose from all available LLMs (OpenAI, OpenRouter.ai, Ollama) and set the current model for your note.
- Clear Chat: Remove all messages while retaining frontmatter.
- Stop Streaming (Desktop Only): Halt ongoing streams if necessary.
- Add Divider: Insert horizontal rulers to organize content visually.
Want to try the latest features before they're officially released? You can beta test ChatGPT MD using the BRAT (Beta Reviewer's Auto-update Tool) community plugin:
- Install the BRAT plugin from Obsidian's Community Plugins
- Open BRAT settings and add
bramses/chatgpt-md
as a beta plugin - Select "latest version" from the dropdown in the BRAT plugin settings
- Enable the ChatGPT MD plugin in your community plugins list
This gives you early access to new features while they're still being developed and tested.
Use the ChatGPT MD: Chat
command from the Obsidian command Palette (cmd + p
or ctrl + p
) to start a conversation from any note.
Yes, you should! Go to Settings > Hotkeys
, search for ChatGPT MD: Chat
and add your preferred keybinding (e.g., cmd + j
).
You can use OpenAI's GPT 3 and 4 models, various models through OpenRouter.ai (like Claude, Gemini, DeepSeek, Llama, Perplexity), or any model you have installed via Ollama. DeepSeek-r1:7b works great for reasoning locally via Ollama.
Ensure your custom API adheres to OpenAI's specifications, such as Azure's hosted endpoints. Consult your provider for API key management details.
In the plugin settings, add your OpenAI API key and/or install Ollama and local LLMs of your choice.
The single 'url' parameter is now deprecated. In v2.2.0 and higher, we've introduced service-specific URL parameters: openaiUrl
, openrouterUrl
, and ollamaUrl
. This allows for more flexibility and clarity when configuring different services. Please update your templates and notes accordingly.
π€ Enjoy exploring the power of ChatGPT MD in your Obsidian vault!π
Pull requests, bug reports, and all other forms of contribution are welcomed and highly encouraged!*
Bram created ChatGPT MD in March 2023 lives in NYC and is building Your Commonbase (A Self Organizing Scrapbook with Zero Stress Storing, Searching, and Sharing). His personal website and newsletter is located at bramadams.dev
Deniz joined Bram in 2024 to continue development. He is working in a gaming company in Germany and uses AI heavily in his work and private life. Say "hi" on Bluesky: Deniz
Happy writing with ChatGPT MD! π» π