Coder Social home page Coder Social logo

nworno / obsidian-bmo-chatbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from longy2k/obsidian-bmo-chatbot

0.0 0.0 0.0 945 KB

Generate and brainstorm ideas while creating your notes using Large Language Models (LLMs) with OpenAI's ChatGPT, Ollama, LM Studio, OpenRouter, and Mistral AI for Obsidian.

Home Page: https://ko-fi.com/longy2k

License: MIT License

JavaScript 0.88% TypeScript 95.16% CSS 3.96%

obsidian-bmo-chatbot's Introduction

BMO Chatbot for Obsidian

Generate and brainstorm ideas while creating your notes using Large Language Models (LLMs) with OpenAI, Ollama, LM Studio, OpenRouter, and Mistral AI.

Screenshot-1

Description of image

Features

  • Interact with self-hosted Large Language Models (LLMs): Use the REST API URLs provided to interact with self-hosted Large Language Models (LLMs) using Ollama or LM Studio.
  • Chat from anywhere in Obsidian: Chat with your bot from anywhere within Obsidian.
  • Chat with current note: Use your chatbot to reference and engage within your current note.
  • Chatbot responds in Markdown: Receive formatted responses in Markdown for consistency.
  • Customizable bot name: Personalize the chatbot's name.
  • System role prompt: Configure the chatbot to prompt for user roles before responding to messages.
  • Custom prompts in Markdown: Create custom prompts in Markdown to interact with your models.
  • Prompt Select Generate: Prompt, select, and generate within your editor.
  • Save current chat history as markdown: Use the /save command in chat to save current conversation.

Requirements

To use this plugin, you'll need an OpenAI account with API access. If you don't have an account yet, you can sign up for one on the OpenAI website.

Additionally, if you want to interact with self-hosted Large Language Models (LLMs) using Ollama or LM Studio, you will need to have the self-hosted API set up and running. You can follow the instructions provided by the self-hosted API provider to get it up and running. Once you have the REST API URL for your self-hosted API, you can use it with this plugin to interact with your models.

Please see instructions to setup with other LLMs providers.

Explore some models at GPT4ALL under the "Model Explorer" section or Ollama's Library.

How to activate the plugin

Three methods:

Obsidian Community plugins (Recommended):

  1. Search for "BMO Chatbot" in the Obsidian Community plugins.
  2. Enable "BMO Chatbot" in the settings.

To activate the plugin from this repo:

  1. Navigate to the plugin's folder in your terminal.
  2. Run npm install to install any necessary dependencies for the plugin.
  3. Once the dependencies have been installed, run npm run build to build the plugin.
  4. Once the plugin has been built, it should be ready to activate.

Install using Beta Reviewers Auto-update Tester (BRAT) - Quick guide for using BRAT

  1. Search for "Obsidian42 - BRAT" in the Obsidian Community plugins.
  2. Open the command palette and run the command BRAT: Add a beta plugin for testing (If you want the plugin version to be frozen, use the command BRAT: Add a beta plugin with frozen version based on a release tag.)
  3. Paste "https://github.com/longy2k/obsidian-bmo-chatbot".
  4. Click on "Add Plugin".
  5. After BRAT confirms the installation, in Settings go to the Community plugins tab.
  6. Refresh the list of plugins.
  7. Find the beta plugin you just installed and enable it.

Getting Started

To start using the plugin, enable it in your settings menu and enter your OpenAI API key. After completing these steps, you can access the bot panel by clicking on the bot icon in the left sidebar.

Commands

  • /help - Show help commands.
  • /model - List or change model.
    • /model 1 or /model "gpt-3.5-turbo"
    • /model 2 or /model "gpt-3.5-turbo-1106"
    • ...
  • /prompt - List or change prompt.
    • /prompt 1 or /prompt "[PROMPT-NAME]"
  • /prompt clear or /prompt c - Clear prompt.
  • /system - Change system prompt.
    • /system "WRITE IN ALL CAPS!"
  • /maxtokens [VALUE] - Set max tokens.
  • /temp [VALUE] - Change temperature range from 0 to 1.
  • /ref on | off - Turn on or off reference current note.
  • /append - Append current chat history to current active note.
  • /save - Save current chat history to a note.
  • /clear or /c - Clear chat history.
  • /stop or /s - Stop fetching response.

Supported Models

  • OpenAI
    • gpt-3.5-turbo
    • gpt-3.5-turbo-1106
      • Newest gpt-3.5-turbo model with a context window of 16,385 tokens, replacing gpt-3.5-turbo-16k.
      • Same pricing as gpt-3.5-turbo.
    • gpt-4 (Context window: 8,192 tokens)
    • gpt-4-1106-preview (Context window: 128,000 tokens)
  • Any self-hosted models using Ollama.
  • Any self-hosted models using OpenAI's REST API URL endpoints.

Other Supported Models (Low Support)

I would like to continue supporting Anthropic's models, but I no longer have access to the API.

  • Anthropic
    • claude-instant-1.2
    • claude-2.0
    • claude-2.1

Other Notes

"BMO" is a tag name for this project, inspired by the character BMO from the animated TV show "Adventure Time."

Contributing

Any ideas or support is highly appreciated :)

If you have any bugs, improvements, or questions please create an issue or discussion!

Buy Me a Coffee at ko-fi.com

obsidian-bmo-chatbot's People

Contributors

longy2k avatar levie-vans avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.