Giter Club home page Giter Club logo

vasilecampeanu / obsidian-weaver Goto Github PK

View Code? Open in Web Editor NEW
187.0 9.0 7.0 3.53 MB

Weaver is a useful Obsidian plugin that integrates ChatGPT/GPT-3 into your note-taking workflow. This plugin makes it easy to access AI-generated suggestions and insights within Obsidian, helping you improve your writing and brainstorming process.

License: MIT License

JavaScript 2.65% TypeScript 81.49% SCSS 15.86%
ai chatbot chatgpt obsidian-md plugin gpt-3 knowledgemanagement

obsidian-weaver's Introduction

Obsidian Weaver

Weaver is a useful Obsidian plugin that integrates ChatGPT/GPT-3 into your note-taking workflow. This plugin makes it easy to access AI-generated suggestions and insights within Obsidian, helping you improve your writing and brainstorming process.

Assistant Role

Note

Please note that Weaver is currently in beta and there may be bugs or issues that need to be addressed. While I have thoroughly tested the plugin, it is possible that unexpected problems may arise. As with any software, it is always a good idea to backup your data before using a new plugin.

Features

Chat List Feature

The current implementation of the plugin offers the following features:

  • New Chat Creation: You can easily create a new chat session with the AI assistant by clicking the "plus" button within Obsidian.
  • AI Assistance: Once you have created a new chat session, you can ask the AI assistant any questions and receive instant responses. This makes it easy to get information and insights on any topic, without having to leave the Obsidian environment.

These features provide a foundation for the plugin and offer a simple yet powerful way to access AI-generated suggestions and insights within Obsidian. I am always working to improve the plugin and add new features, so stay tuned for updates and improvements in the future!

Why should you use this?

Respecting the philosophy of Obsidian

At the core of Obsidian's philosophy is the idea of storing notes locally, allowing users to have complete control over their data. Weaver respects this philosophy by storing all chats locally in a .bson format, ensuring that your data remains secure and private. With Weaver, you can use the power of AI to enhance your note-taking experience without sacrificing privacy or control over your data.

What sets this apart from other GPT-like plugins in Obsidian?

What sets Weaver apart from other GPT-like plugins in Obsidian is its unique integration with the Obsidian interface and functionality. While other plugins may replicate the ability to generate text from a prompt, they do not offer the same level of integration and ease of use as Weaver.

This integration not only makes the writing process more efficient, but it also helps you stay focused and on track, as you don't have to switch between different applications or interfaces. With Weaver, you can stay within the Obsidian environment and take advantage of all the features and tools that Obsidian has to offer, making the writing and brainstorming process more enjoyable and productive.

Installation

The plugin is not yet available in the plugin library, will be soon. Stay tunned.

Manual

  1. Go to the releases and download main.js, manifest.json, and styles.css of the latest version.
  2. Put the files in YourObsidianVault/.obsidian/plugins/obsidian-weaver/
  3. Reload the plugins in Obsidian settings or restart the program.
  4. The plugin can now be enabled in the plugins menu.

Brat

You can also install Weaver using the community plugin obsidian42-brat.

Getting Started with Obsidian Weaver

Here is a step-by-step guide on how to get started with Obsidian Weaver:

Obtaining an OpenAI API Key

In order to use Obsidian Weaver, you will need to obtain an API key from OpenAI. You can sign up for an API key on the OpenAI website. Once you have obtained your API key, you will be able to use it to access OpenAI's GPT-3 models.

Alt text

Choosing a Model

Once you have obtained an API key, you will need to choose which GPT-3 model you would like to use. Currently, Obsidian Weaver supports multiple models, each with its own strengths and capabilities. Please note that the GPT-4 model is not yet available to the public, and to use it, you will need to request access to it.

Configuration

Obsidian Weaver allows you to configure the AI model to suit your specific needs. You can adjust the maximum number of tokens generated, the temperature, and the frequency penalty. These settings can be adjusted to control the level of creativity and specificity of the AI-generated responses.

  • Maximum Number of Tokens Generated: This setting determines the maximum number of tokens (i.e. words or phrases) that the AI model will generate in response to a prompt. By adjusting this setting, you can control the length of the AI-generated responses.
  • Temperature: This setting controls the level of creativity and randomness in the AI-generated responses. A higher temperature will result in more creative and diverse responses, while a lower temperature will result in more specific and accurate responses.
  • Frequency Penalty: This setting adjusts the frequency of the AI-generated responses. A higher frequency penalty will result in more common and frequently used responses, while a lower frequency penalty will result in more unique and uncommon responses.

Future Features and Improvements

  • Threads: similar to folders, but containing lists of messages. This will allow you to better organize your conversations and find the information you need more easily.
  • Search: The ability to search through messages in a chat session and through threads, making it easier to find the information you need.
  • Context Awareness: The ability for the plugin to be aware of the note that the user is working on, providing more relevant and context-specific responses. Internet Search: The ability to perform internet searches within the plugin, similar to what Big Chat does.
  • Note Suggestions: The ability to offer suggestions for notes based on the current chat session, making it easier to create new notes and organize your information.
  • Internet Search: The ability to perform internet searches within the plugin, similar to what Big Chat does.
  • Embeddings: The ability to generate and use embeddings to improve the performance of the AI model.
  • Multiple Models: The ability to choose between multiple AI models, allowing you to select the best model for your specific needs.
  • ChatGPT API: Future support for the ChatGPT API release, allowing you to access the latest and most advanced AI models.

Development Schedule

As a student, I am working on this project in my free time. While I am dedicated to improving the plugin and adding new features, the development process may take some time. I am constantly working to improve the plugin and add new features, but please be patient as I balance my studies and other responsibilities.

If you have any suggestions for new features or improvements, your input is invaluable to the development process. To share your ideas, please consider opening an issue on the plugin's GitHub repository. This allows you to provide detailed feedback and suggestions in a centralized location, where they can be easily tracked and discussed. Your contributions will help me prioritize new features and improvements and ensure that the plugin meets the needs of its users.

Special Thanks and Recognition

obsidian-weaver's People

Contributors

chhoumann avatar tfthacker avatar vasilecampeanu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obsidian-weaver's Issues

Cannot input text when frame docked at top right corner

Hi

First, thanks for your great work !
I met the following issue which is new after recent update (just updated with BRAT).

When tab is on main frame, all is fine, but when I the tab is at top right corner I have no access to the text input form.
image
image

Hope it's sufficient to investigate

Tag note at the end

Thank you for the plug-in which is nicely integrated into Obsidian.

At the end of most chats is a recommendation "As for tags related to this topic..."

The tags do not seem to be from my vault. What do you recommend we do with them? Is it suggested that we create them for our vault?

Request cancelled.

It's great to have a plug that is integrated well into Obsidian

When I try to start a chat, I get this response:

I'm sorry, but I am unable to generate a response at this time. This may be because your request was cancelled, GPT4 is currently in use, or an error has occurred. Please check your settings and try again later.

I disabled Text Generator and re-started, in case this was a problem. I'm using the same API. It works with Text Generator.

Here's what the console says:
image

The engine is GPT3.5 Turbo.

Let me know if there's anything you'd like me to explore further.

Load texts being generated as they are generated

It would be great if obsidian displays the text being generated in real time while GPT is generating the text. This allows me to read the message as it is being generated and helps me decide whether I should stop GPT from generating more text.

Currently, the respond box is only loaded after the entire response message is completed. As a user, I feel a little uncomfortable waiting for the message to be completed. I would like to read it while it is being generated.

Copy chat responses to clipboard

I like to ask ChatGPT to describe something, then copy its response into a note. Right now, I have to manually highlight the text I want to copy, paste it, and manually clean up the formatting.

It would be great if there is a button that copies everything in a response box into clipboard. I can then paste it anywhere I want and modify it.

Can't found Release

Hello!
I would like to try the release, using BRAT, but no release are found.
I don't know which branch or tag to use to build the main.js, so i'm little lost.

Should work with mermaid diagrams

Since I saw you put latex in the system role prompt, my first thought was to test my latest chatgpt hobby: text adventure gaming with dynamic diagrams!
image

It did not quite work and I'm not sure why. Here's the prompt:

what's the relationship between the sun and its planets? Draw in a mermaid diagram code block

I'll paste an image of the output so you can see that it is overflowing wayyyyy off the screen
image

And the text:

The relationship between the sun and its planets can be represented using a mermaid diagram in Obsidian. Here is an example code block that illustrates this relationship:

```mermaid
graph LR
    A[Sun] --> B[Mercury]
    A --> C[Venus]
    A --> D[Earth]
    A --> E[Mars]
    A --> F[Jupiter]
    A --> G[Saturn]
    A --> H[Uranus]
    A --> I[Neptune]

This code block uses Mermaid syntax to create a graph with the Sun at the center and each planet connected to it by an arrow. The arrows represent the gravitational pull of the Sun on each planet, which keeps them in orbit around it.

Note that you will need to have the Mermaid plugin installed in Obsidian to render this code block properly. You can install the plugin by going to the Community Plugins tab in the Obsidian settings menu and searching for "Mermaid".

Any clue what to change here to make it work?

update: looks like it just didn't close the code block. Let me see if I can get the bot to do it w/o code changes.

Parameter for controlling number of messages sent with each user message

It can be useful to configure how many previous messages in a conversation are sent to the API. In some scenarios, like simple language translation, the history of the conversation does not add any value, but does increase the token count.

In some other clients I see you can set the number of previous messages (like 0 to 100) to control how many are sent.

Related to this is the ability to delete various messages from a conversation so as not to resend something that in the end wasn't valuable in the conversation.

Better response rendering

Hi, this is definitely an awesome plug-in to see! Thank you for making it.

I'm wondering if we can improve the markdown rendering of the responses in the following ways:

  1. Support math rendering. I see you using remark/react-markdown to render the dialogue bubbles, I'm sure it supports a go-to math rendering plug-in (check this). It would be very helpful to people who work in academia to have latex rendered in response!

  2. Rely more on obsidian's rendering tools

    1. I think for code blocks rendering, obsidian exposes its global Prism object through loadPrism. I'm not an expert on this and not sure if it can be helpful or not, so this is just FYI.
    2. Similarly, I'm wondering if there is an API to utilize obsidian's Markdown engine so we can throw remark/react-markdown away, with way better consistency with the rest of the app. However, after a quick view of the relevant APIs, I'm not able to come up with a quick way to do this in our React components. It will be great if anyone else with more knowledge can help :)

error message "an error has occurred"

image

Hey! I'm getting this error message. I provided my api key from openAI. and the model i have selected in the plugin settings menu is 3.5, not turbo, or 4. Do you have an idea of what could be causing this issue?

Add local language models support

Hi, @vasilecampeanu !

While GPT-* models are awesome, there's an issue of privacy arising from using an external third party API, especially when the information may be sensitive. More than that, they don't allow as much customization for one's needs as the local models. In my mind, adding support of local models is one of the top priorities of such a plugin.

Fortunately, thanks for people like oobabooga making a wrapper for many possible local models like LLaMa, Vicuna, MPT, Galactica, etc it's pretty straightforward to implement. Just replace the call for OpenAI's API to oobabooga API's endpoint. For example, how I did this rizerphe/obsidian-companion#13 (may require some tweaks)

supports streaming mode as well

Set parameters per conversation

Currently we can globally configure the

  • gpt API (ex: 3.5, 4.)
  • Prompt
  • max tokens
  • and so on

It would be super helpful to be able to set the parameters at an individual conversation level. Therefore, if they are not set at the conversation level, the conversation uses the defaults defined in the settings.

If they are defined in the conversation, then they use those specific settings. This can help tweak certain conversations for very specific purposes. For example, I might have one conversation where I want to use the 4.0 API, along with a very specific system role prompt, while another conversation would use the 3.5 API with a very different system role prompt.

4.0 API works better for certain things, especially since it is more sensitive to the system role, whereas 3.5 is good for many things and cheaper.

I know this is a big ask, since each conversation would need to maintain its own configuration and UI for it.

Use Weaver without an OpenAI key for privacy

Using a key links all your searches and responses to an identity. Requests will always be linked with an IP address, but that address is shared in most cases. I'd love to use the plugin but don't want to create a key and add my identity to big metadata bucket in the sky. Any chance of modifying the plugin to not use an API key, even at the loss of some functionality?

Font size too small

Is there a way to adjust the font to a larger size?
I'm using Minimal theme together with Minimal Theme Settings and Style settings plugins
It's incredibly tiny right now, and any font size settings in obsidian and these plugins doesn't affect it.

Consistent error getting responses

Since installation and with different models, the plugin keeps returning an error. Here is the return on the chat view and the console. I'm on Obsidian 1.2.2 installer 1.1.9, MacOs Ventura

Screenshot 2023-04-10 at 2 00 26 PM

Screenshot 2023-04-10 at 2 00 57 PM

Rate Limited - Fresh Install

I am getting this error after a fresh install of this plugin.

image

I have all the settings to the default except my api key. Any help would be very much appreciated.

Error: HTTP error! status: 400

After 15 minutes of using ChatGPT it responds with "Error: HTTP error! status: 400"
image
There is a workaround where you disable the context feature (the green button in the upper right). Still, it would be nice if I could keep this feature.
image

Unable to load on iOS

I tried to install the plugin on Obsidian mobile through BRAT, but after BRAT installs it, I cannot enable it in Obsidian community plugin menu.

I pressed the enable toggle button, but it refused to toggle on.

I don't see any error notification, and I don't know how to get the logs to provide you more information.

The only community plugins I have in my vault is BRAT and Weaver (this).

Can't enable the plugin

I can install the plugin manually or via BRAT, but cannot enable it despite restarting Obsidian several times. All other community plugins can be enabled/disabled without problems.

Clicking on conversation from pane opens the conversation

First, Kudo's. Loving the styling of this plugin.

When clicking on a conversation in the main view, it should open the conversation thread. Currently we have to click on the arrow to open the conversation.

As you can see in the screen grab where I am clicking it seems natural it would open the conversation.

CleanShot 2023-04-19 at 17 10 21

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.