|
1 | 1 | # ChatGPT MD |
2 | 2 |
|
3 | | -🚀 A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into Obsidian. |
| 3 | +🚀 A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama/LM Studio into Obsidian. |
4 | 4 |
|
5 | 5 |  |
6 | 6 |
|
7 | | -## 🚀 What's New in v3.0.0: Privacy-First AI Tool Calling |
| 7 | +## 🚀 What's New in v3.0.0: Privacy-First AI Tool Calling (off by default - Settings → ChatGPT MD → Tool Calling) |
8 | 8 |
|
9 | | -**Your AI assistant can now search your vault, read files, and search the web—with explicit approval at every step.** |
| 9 | +**Your AI assistant can now actively search your vault, read files, and query the web—with a human-in-the-loop architecture that keeps you in control.** |
10 | 10 |
|
11 | | -### Key Features |
| 11 | +v3.0.0 introduces a **tool calling system** built on privacy-first principles. When your AI needs information, it requests permission to use tools—you approve execution, review results, and control exactly what gets shared back to the model. Nothing leaves your vault without explicit consent. |
12 | 12 |
|
13 | | -- **🔍 Vault Search**: AI discovers relevant notes in your vault (you approve which files to share) |
14 | | -- **📄 File Reading**: AI can request access to specific files (you select which ones) |
15 | | -- **🌐 Web Search**: AI searches the web via Brave Search API (1,000 free queries/month) |
16 | | -- **✅ Three-Layer Approval System**: |
17 | | - 1. Approve what the AI wants to do |
18 | | - 2. Review what it found |
19 | | - 3. Select exactly which results to share |
20 | | -- **🔒 Privacy-First Design**: No data reaches the AI without your explicit consent |
21 | | -- **🎯 All Providers Supported**: OpenAI, Anthropic, Gemini, OpenRouter, Ollama, LM Studio |
22 | | -- **⚙️ Disabled by Default**: Opt-in feature only—enable in Settings → Tool Calling |
23 | | - |
24 | | -### Why This Matters |
25 | | - |
26 | | -For privacy-conscious note-takers, this is a game-changer. You get the power of AI with full control over your data. Your vault stays yours. |
27 | | - |
28 | | -### Getting Started with Tool Calling |
29 | | - |
30 | | -1. **Install the beta**: Use [BRAT plugin](https://github.com/TfTHacker/obsidian42-brat) and select version **2.12.0-beta** |
31 | | -2. **Enable in settings**: Go to Settings → ChatGPT MD → Tool Calling |
32 | | -3. **Optional**: Add Brave Search API key for web search (1,000 free queries/month) |
33 | | -4. **Start chatting**: Your AI will ask for approval when it wants to use tools |
34 | | - |
35 | | -⚠️ **Beta Warning**: Test on a backup/test vault first. This is a beta release with active development. |
36 | | - |
37 | | -### Use Cases |
38 | | - |
39 | | -- **Research Assistant**: "Search my vault for notes about quantum computing and find recent papers" |
40 | | -- **Knowledge Synthesis**: "Find all my Q3 meeting notes and summarize key decisions" |
41 | | -- **Web-Enhanced Writing**: "Search the web for latest statistics and incorporate them" |
42 | | -- **Note Discovery**: "Find connections between notes I might have missed" |
43 | 13 |
|
44 | 14 | ## A simple and quick Start 🏁 |
45 | 15 | Get started in just a few simple steps: |
@@ -160,6 +130,77 @@ openaiUrl: https://api.openai.com |
160 | 130 | 💡 Pro tip: Increasing `max_tokens` to a higher value e.g. `4096` for more complex tasks like reasoning, coding or text creation. |
161 | 131 | The default model `gpt-5-mini` is optimized for speed and efficiency. Upgrade to `gpt-5` for enhanced reasoning capabilities or use `gpt-5-nano` for ultra-lightweight responses. |
162 | 132 |
|
| 133 | +### Tools |
| 134 | + |
| 135 | +1. **Install**: Update or install v3.0.0+ from Obsidian |
| 136 | +2. **Configure**: Settings → ChatGPT MD → Tool Calling → Enable, |
| 137 | +3. **Optional**: Add [Brave Search API key](https://brave.com/search/api/) (free tier: 1,000 queries/month) |
| 138 | +4. **Chat**: Use the `ChatGPT MD: Chat` command. AI will request tool use when needed. |
| 139 | + |
| 140 | +The implementation follows a three-layer approval pattern: |
| 141 | + |
| 142 | +1. **Execution Layer**: AI requests tool use with parameters |
| 143 | +2. **Processing Layer**: Tool executes locally in your vault using Obsidian's API (full-text search across filenames and content) |
| 144 | +3. **Approval Layer**: Interactive modals let you filter results before they're returned to the AI |
| 145 | + |
| 146 | +### Available Tools |
| 147 | + |
| 148 | +**Vault Search** (`vault_search`) |
| 149 | +- Multi-word OR search: matches ANY query term across your vault |
| 150 | +- Searches both filenames and file content simultaneously |
| 151 | +- Excludes current file to prevent recursion |
| 152 | +- Configurable result limits (default: 5 files) |
| 153 | +- Query editing: refine search terms before execution |
| 154 | + |
| 155 | +**File Read** (`file_read`) |
| 156 | +- Direct file access when AI knows specific file paths |
| 157 | +- Batch reading support for multiple files |
| 158 | +- Full content extraction with your approval |
| 159 | +- Useful for targeted lookups once files are discovered |
| 160 | + |
| 161 | +**Web Search** (`web_search`) |
| 162 | +- Powered by Brave Search API (privacy-focused, 1,000 free queries/month) |
| 163 | +- Custom search provider support for self-hosted endpoints |
| 164 | +- Optional full-page content fetching |
| 165 | +- Automatic API key validation—tool only appears when configured |
| 166 | +- Query editing: modify web search queries before execution |
| 167 | + |
| 168 | +### Privacy & Security |
| 169 | + |
| 170 | +- **Local-First Execution**: All vault operations run entirely within Obsidian's API |
| 171 | +- **Selective Sharing**: Multi-select modals let you choose exactly which results to share |
| 172 | +- **No Telemetry**: Zero tracking or analytics—tool usage stays private |
| 173 | + |
| 174 | +### Configuration |
| 175 | + |
| 176 | +Enable tool calling in **Settings → ChatGPT MD → Tool Calling**: |
| 177 | + |
| 178 | +- **Enable Tool Calling**: Master switch (default: disabled) |
| 179 | +- **Brave Search API Key**: Your Brave Search API key |
| 180 | +- **Custom Provider URL**: Self-hosted search endpoint |
| 181 | +- **Max Web Results**: Number of web results to return (1-10) |
| 182 | + |
| 183 | +### Use Cases |
| 184 | + |
| 185 | +**Research Assistant**: "Search my vault for notes about quantum computing algorithms and recent papers on the topic" |
| 186 | + |
| 187 | +→ AI discovers relevant notes → You approve which files to share → AI synthesizes information with proper attribution |
| 188 | + |
| 189 | +**Knowledge Synthesis**: "Find all my Q3 meeting notes and summarize key decisions about product roadmap" |
| 190 | + |
| 191 | +→ Vault search returns meeting files → You select the relevant ones → AI extracts and summarizes decisions |
| 192 | + |
| 193 | +**Web-Enhanced Writing**: "Search the web for latest climate change statistics and incorporate them into my article" |
| 194 | + |
| 195 | +→ Web search fetches current data → You filter reliable sources → AI integrates citations into your draft |
| 196 | + |
| 197 | +**Cross-Reference Discovery**: "Find notes that mention both machine learning and productivity techniques" |
| 198 | + |
| 199 | +→ Multi-word OR search finds intersections → You approve interesting connections → AI highlights patterns you might have missed |
| 200 | + |
| 201 | +⚠️ **Note**: Tool support depends on model capabilities. Older models may not support function calling. You can check tool capabilities in the tool selection list after enabling tool support in the settings. |
| 202 | + |
| 203 | + |
163 | 204 | ### Multi Model Chats |
164 | 205 | You can set and change the model for each request in your note. |
165 | 206 | Specify the `model` property via frontmatter: |
|
0 commit comments