Daniel Lyons' Notes

AI in Obsidian Local LLM Setup Guide in CoPilot

Description

//Obsidian Starter Vault Downloads
Free Kit: https://ko-fi.com/s/33678f10a7 (Free)
Pro Kit: https://ko-fi.com/s/c8e544e005 (Donation)
Obsidian App: https://obsidian.md/

// Description
Hi I'm Paul, and in today's video we'll integrate local AI tools in Obsidian using LM Studio and the CoPilot Plugin. This setup will let you use AI directly within Obsidian to summarise notes, find connections and boost your productivity. I will also showcase a custom Open AI method which you could use with your own Open AI API or similar.
I'll walk you through my setup, then show you how to create your own AI Powered Obsidian Vault.
Join me as we power up your Obsidian Vault with AI

// CommunityFeedback
I hope this opens up new possibilities for your note-taking, research, and knowledge management. I'd love to hear how you're using AI with Obsidian – are you focusing on summarization, idea generation, or something else entirely?

// Covered in this video

  • LM Studio, Custom Frames, Obsidian CoPilot, Deepseek R1, Claude, OpenAI, GPT-4o, Open WebUI.

// To get your Custom APIs you could use any of the following
https://platform.openai.com/ (OpenAI)
https://console.anthropic.com/dashboard (Anthropic).
https://aistudio.google.com/app/apikey (Google)

// AI Tool Resources
https://www.obsidiancopilot.com/en - CoPilot for Obsidian
https://openwebui.com/ - Self Host AI
https://lmstudio.ai/ - Local LLM
https://lmarena.ai/ - Rank AI
https://llmpricecheck.com/calculator/ - LLM Pricing Calculator

// Buy me a Coffee
https://ko-fi.com/motion2082

My Notes

00:00 - Intro

  • 00:04 Integrating local and Cloud AI Tools in Obsidian.
  • 00:07 Tools used: LM Studio and the Copilot plugin.
  • 00:12 Goal: Use AI directly in Obsidian to summarize notes, find connections, and boost your productivity.

00:28 - Introducing Artificial Intelligence Inside Obsidian

  • 00:32 Copilot plugin for Obsidian:
    • 00:35 Open source LLM interface right inside Obsidian.
    • 00:38 Minimalistic design and straightforward to use.
  • 00:41 LM Studio:
    • 00:43 Desktop app for developing and experimenting with LLMs locally.
  • 00:50 DeepSeek:
    • 00:52 AI company that develops and releases large language models.
    • 00:57 Most well-known: DeepSeek R1 (open-source model, can compete with OpenAI/Google for a fraction of the cost).
  • 01:09 Open Web UI:
    • 01:12 Open source, self-hosted AI interface.
    • 01:14 Provides a user-friendly way to interact with various large language models.
    • 01:19 Can be run entirely offline giving you more control over your data and privacy.
  • 01:24 Obsidian Custom Frames plugin:
    • 01:27 Turns web apps into panes using iframes with custom styling.
    • 01:30 Used to load Open Web UI inside Obsidian.

01:37 - AI Tools Inside Obsidian Showcase

  • 01:41 Two primary ways to use AI tools inside of Obsidian:
    • 01:48 Use a Commander shortcut to the Custom Frames plugin.
      • 01:53 Set up a custom frame which goes straight to your AI tool (Open Web UI in demo).
      • 01:58 Select which model of AI you would like to use right inside of Obsidian.
    • 02:03 Use the Copilot for Obsidian Community plugin.
      • 02:09 Have a few models to choose from by default.
      • 02:15 Key Feature: Can add your own custom models from any of the listed providers.
        • 02:24 One provider is LM Studio.
  • 02:24 Using LM Studio locally:
    • 02:27 Download your open source large language model in LM Studio.
    • 02:29 Select your model and load your model in LM Studio.
    • 02:34 Smaller models perform a lot better and are less resource intensive.
    • 02:40 Options for interaction with LM Studio models:
      • 02:40 Chat directly inside LM Studio (e.g., on a second monitor).
      • 02:47 Use your Open Web UI tools (e.g., on a second monitor).
      • 02:53 Bring those into Obsidian with the Copilot plugin using your API key (depending on the AI tool).
  • 03:03 The cost is going to be different for each AI tool.
  • 03:08 Accessing Copilot chat in Obsidian: Hit Control + P, type in copilot, select Open the copilot chat window.
    • 03:20 Opens up the Copilot plugin in the right pane, similar to Custom Frames.
    • 03:22 Simply choose your model here and then start entering in your requests.
    • 03:32 Benefit: Can save your chats as a note.
  • 03:35 Copilot Vault QA Mode:
    • 03:38 Ability to interact with your entire Vault.
    • 03:41 Simply change the chat to Vault QA mode.
    • 03:45 This will use an embedded model which are locally indexed to ensure your data isn't sent to the cloud.
    • 03:53 You'll see a few suggested prompts in the chat window.
    • 03:56 Can also ask Copilot about your note (e.g., summarize the note).
    • 04:14 Copilot also allows you to find relevant notes.
      • 04:17 See a drop down arrow at the top showing similar notes.
      • 04:27 See the score by rolling over it.
      • 04:29 Could add it to the chat and ask a question, then go through the similarities.
  • 04:42 Previously used AI tools on a second monitor through an Open Web UI making external requests (paid monthly subscription).
  • 04:59 Sometimes use the Custom Frames plugin inside Obsidian to bring that Open Web UI into the right pane.
  • 05:07 Only recently experimenting with the Copilot plugin and hosting large language models locally on LM Studio.
  • 05:17 Running the larger local models is very resource intensive and not too comfortable (7B and above models are a little bit too slow and resource intensive).
  • 05:33 Experimenting with the Copilot plugin for interacting with notes.

05:42 - How to Setup a Local Large Language Model (LLM)

  • 05:47 LM Studio will allow us to discover, download and run local large language models on our computer.
  • 05:55 With LM Studio, we can run a large language model entirely offline.
  • 06:01 Chat with our local documents right in the privacy of our own home.
  • 06:05 Hardware used in demo: 13700K with a RTX 480 (16 GB of vram) - can handle up to 14B models.
  • 06:13 Steps to setup in LM Studio:
    • 06:17 Navigate over to the Discover tab on the left hand side.
    • 06:19 Enter the name of the large language model that you would like to download in the search field (e.g., DeepSeek R1).
    • 06:42 Shows search results (e.g., DeepSeek R1 7B).
    • 06:47 Go down the bottom right and download this model (shows size, e.g., 4.68 GB).
    • 06:56 Pop up download window shows estimated time.
    • 07:10 Once download completes, it will show up under the My Models directory.
    • 07:26 'B' stands for billion parameters. Size is shown over to the right.
    • 07:35 Running the 1.5B model ensures really good performance inside of Obsidian.
    • 07:47 Running the 7B model locally is going to use a lot of your CPU, GPU and RAM and may slow down your computer.
    • 07:58 If wanting to host larger models, recommend using a second computer.
    • 08:03 For something quick, local, and private inside Obsidian, the 1.5B model or Llama 3B is going to be the best.
    • 08:12 Can choose your model directory up the top.
    • 08:22 Go into the Developer tab inside here.
    • 08:26 Select a model to load (e.g., the 1.5B model).
    • 08:35 Configure settings: context length, GPU offload (dial down if needed), CPU threads (set to avoid full CPU usage). Can check remember settings for this model.
    • 09:03 Hit Load model.
    • 09:08 Also need to load an embed model for Obsidian to index notes so you can query the AI about those notes.
    • 09:21 Select the embed model (e.g., text-embedding-nomic-embed-1.5). Leave settings default for a small model.
    • 09:27 Go to the Server tab.
    • 09:32 Check your server port number (default should be 1234 or 1235).
    • 09:35 Enable cross origin resource sharing.
    • 09:38 Start your server.
    • 09:41 Developer logs confirm it's listing on the specified port (e.g., 1234, 1235) on localhost.
    • 09:54 These two models are ready to go via the local API.
    • 09:56 Can use this to chat inside of LM Studio on a second monitor (can add images, slightly quicker).
    • 10:16 To use it inside Obsidian, jump back into Obsidian and open up Copilot.
    • 10:21 Select the 1.5 Bravo model (the local one).
    • 10:24 Prompt for a question (e.g., "What is the capital of France?").
    • 10:28 It's still quite responsive, but you don't have to step outside of Obsidian.
    • 10:34 Note: Takes 9 seconds in Copilot plugin vs. 6 seconds direct in LM Studio.

10:45 - How to Setup AI Tools in Obsidian

  • 10:50 Install the Copilot plugin:
    • 10:50 Click on the Cog wheel -> Community plugins -> Browse.
    • 10:56 Type in copilot.
    • 10:59 Install and Enable the plugin.
  • 11:02 Copilot Plugin Options:
    • 11:05 Jump into the options. If you have an OpenAI API key, set it here. If you have a Copilot Plus license, enter it here.
    • 11:18 Head over to the Model Tab.
    • 11:20 See the default loaded models. Remove all of these.
    • 11:30 Uncheck enabled default models.
    • 11:34 Keep everything else default.
    • 11:34 Go up to Add custom model.
  • 11:37 Adding External API Models (Open Web UI / Hosted)
    • 11:40 Select OpenAI format as the provider.
    • 11:54 Put in your Base URL (where your open AI tools are hosted).
    • 12:01 Enter in your API key.
    • 12:08 Specify which model name you want to bring into Copilot (e.g., GPT-4o).
    • 12:18 Click Verify (does a model verification).
    • 12:26 Click Add model.
    • 12:30 Now you have your custom model added.
    • 12:34 Do the same for other models (e.g., Claude 3.5 Sonnet). Repeat the same steps.
    • 12:53 Now you have an OpenAI and Anthropic AI tools added.
    • 12:57 Could also add DeepSeek R1 (ensure hosted in a preferred location like the US for privacy).
    • 13:25 Model verification is successful.
    • 13:25 Now you have your three models (or as many as you want).
  • 13:32 #### Adding Embedding Models (for Vault QA)
    • 13:32 Now you have your chat models enabled, need to go down and add your embedding models.
    • 13:38 See a few that come included. Can remove them or leave them.
    • 13:47 Add a custom model.
    • 13:49 Ask for the name of your model. Bring up LM Studio.
    • 13:56 Find the embedding model running in LM Studio (e.g., text-embedding-nomic-embed-1.5).
    • 14:10 Copy this and paste it in as your model name.
    • 14:13 Running this locally on your local server.
    • 14:22 Change your provider to LM Studio.
    • 14:25 Paste the model name again (seems like a small skip/repeat).
    • 14:30 Grab your local server address (e.g., localhost on Port 1235). Paste that in.
    • 14:38 Need to put a /v1 at the end of the URL.
    • 14:38 Hit Verify.
    • 14:41 Verified the model.
    • 14:43 Add that model.
    • 14:46 Now you have your embedding model added.
  • 14:49 #### Final Configuration
    • 14:49 Come back to the Basic Tab.
    • 14:51 Change your default chat model to one of the models you've added (e.g., Claude 3.5, or a faster one).
    • 15:05 Make sure your embedding model is your local one stored in LM Studio.
    • 15:11 Copilot is going to ask us to index our vault. Don't worry, it does this locally, not sending data out. Hit Continue.
    • 15:22 At the top, Copilot will start indexing your Vault. Let that run.
    • 15:28 Default mode will be chat, but you can change that.
    • 15:34 Option to open the plugin in the sidebar.
    • 15:36 Can change any commands (left as default).
    • 15:44 The only other thing usually done is turning on encryption for API keys.
    • 15:49 Everything else can be left as is.
    • 15:52 Wait for Copilot to index your vault (can check LM Studio logs).
    • 16:06 LM Studio logs show indexing activity.
    • 16:09 Copilot places a shortcut on the ribbon. Select Open Copilot chat.
    • 16:15 This replaces the custom iframe with the Copilot.
    • 16:18 Shows chat window down the bottom, with chat selected and model name displayed.
    • 16:25 Start with GPT-4o in demo.
    • 16:27 Prompt for a question (e.g., "What is the capital of France?"). Responds quite quickly.
    • 16:35 Get more information by moving the pane.
    • 16:41 Options: Save this chat as a note (button), three dots (suggest prompt, relevant notes, refresh vault index).
    • 16:52 Can delete, edit, or copy your question.
    • 16:57 Right-click to copy the response text.
    • 17:05 Start a new chat. Ask another question (responds quickly).
    • 17:17 Try another model (e.g., Claude 3.5 Sonnet). Responds quickly.
  • 17:26 #### Using Vault QA Mode
    • 17:26 Switch over to Vault QA.
    • 17:32 Shows vault index is up to date. See the prompt Ask anything for notes with custom prompts.
    • 17:39 Bring up a note (e.g., Mindset). Ask: Can you summarize my note [[Mindset]]. Put double square brackets around the note name.
    • 17:51 It thinks about it and gives a response.
    • 17:54 Can either save this chat as a note or copy it into the existing note.
    • 18:03 Look at relevant notes. Links are shown up top.
    • 18:06 Click the drop down to show all relevant notes with scores.
    • 18:11 Can select relevant notes (e.g., As a man thinkers by James Allen, Be Unstoppable by Aden Mills).
    • 18:23 The AI is suggesting relevant notes.
    • 18:28 Can hide the relevant notes section.
    • 18:33 Make sure you change it back to Chat mode when you're done with Vault QA.
  • 18:39 #### Using Local LM Studio Models for Chat
    • 18:39 If not comfortable using an external API request due to cost/token usage or privacy, you can host models locally in LM Studio.
    • 18:54 In LM Studio, you have downloaded models (DeepSeek R1, Llama 3.2 in demo).
    • 19:06 Running RTX 480 can run models up to 14B parameters, but it's resource-intensive and can be slow.
    • 19:18 Still prefer using external API tools (OpenAI) because they're quicker.
    • 19:27 If wanting to run something locally and privately, load something like a 1.5 billion parameter model (not as smart but keeps Vault private).
    • 19:40 Showcase how to add a local LM Studio model for chat in Copilot.
    • 19:43 Jump back into Obsidian -> Copilot settings -> Models.
    • 19:51 Add a custom model. Change provider to LM Studio.
    • 19:56 Grab the model name from LM Studio (e.g., deepseek-coder-1.3b). Paste that in as your model name.
    • 20:05 Grab your Base URL which is your local host on Port 1235.
    • 20:10 Need to put /v1 at the end.
    • 20:10 Hit Verify. Model is successful.
    • 20:19 Add deepseek R1 1.5b to Copilot.
    • 20:24 Now DeepSeek R1 1.5b is added to Copilot.
    • 20:27 Choose that local model to use.
    • 20:30 Ask a similar question ("What is the capital of France?").
    • 20:32 Bring up LM Studio at the same time; you can see it generating the prompt made inside Obsidian.
    • 20:44 Responded within 9 seconds from the DeepSeek R1 1.5b model. Gives a bit more information than just the capital.
    • 20:58 Not been too resource heavy, not noticing too much performance issue inside of Obsidian.
    • 21:04 It's also private, not going out to the internet.
    • 21:16 Recommended experimenting with these AI Tools in your Obsidian Vault if interested.

21:19 - Outro

  • 21:22 Powerful AI integrated right into your Obsidian Vault using local and cloud tools.
  • 21:25 Let the presenter know how you're using AI with Obsidian in the comments (summarizing, idea generation, etc.).
  • 21:35 If found helpful, please like and subscribe for more Obsidian tips and tricks.

Transcript

AI in Obsidian Local LLM Setup Guide in CoPilot
Interactive graph
On this page
Description
My Notes
00:00 - Intro
00:28 - Introducing Artificial Intelligence Inside Obsidian
01:37 - AI Tools Inside Obsidian Showcase
05:42 - How to Setup a Local Large Language Model (LLM)
10:45 - How to Setup AI Tools in Obsidian
21:19 - Outro
Transcript