Coder Social home page Coder Social logo

interwebalchemy / obsidian-ai-research-assistant Goto Github PK

View Code? Open in Web Editor NEW
88.0 4.0 9.0 1.48 MB

Prompt Engineering Research Tool for AI APIs

License: MIT No Attribution

JavaScript 3.69% TypeScript 84.86% CSS 11.02% Shell 0.43%
ai-research gpt-3 obsidian-md obsidian-plugin openai openai-api prompt-engineering

obsidian-ai-research-assistant's People

Contributors

ericrallen avatar semantic-release-bot 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

Watchers

 avatar  avatar  avatar

obsidian-ai-research-assistant's Issues

[Request]: Resubmit Prompt

Is your feature request related to a problem? Please describe.

During a conversation, sometimes it would be nice to be able to resubmit the previous prompt - especially if you have hot-swapped models and don't want to have to forget the previous prompt and response.

Describe the solution you'd like

A button next to the memory manager for user messages that allows you to resubmit a prompt.

Maybe also a button next to the memory manager for bot messages that allows you to regenerate a response.

[Request]: Ollama Support

Is your feature request related to a problem? Please describe.

Add support for ollama models.

Describe the solution you'd like

If ollama is running, populate the models dropdown with available local models.

If an ollama model is selected, submit the request to the ollama model via the completion endpoint.

Additional context

We'll need to add a new ollama service with a generic model definition and adapter configuration.

We'll also need a formatting utility similar to the formatChat utility for the existing openai service.

Editable Title by Default when Autosave is Enabled

When a user starts a new Conversation with Autosaving enabled, we should:

  • temporarily disable the autosave interval
  • make the title editable by default
  • (maybe?) automatically send focus to the editable title
  • re-enable the autosave interval once the title has been updated

Right now there is just an annoying nag notification about renaming your conversation.

[BUG]: Token calculation logic is wrong

Describe the bug

Tokens are calculated incorrectly

To Reproduce Steps to reproduce the behavior:

  1. Watch the token count when typing a prompt and compare it to the same prompt from gpt-tokenizer.

Expected behavior

Token count should match the expected value based on how tiktoken calculates tokens for the chosen model.

Additional context

This plugin originally only worked with the text-davinci-003 model and there was not a good JavaScript port of tiktoken available at the time.

We should replace gpt3-tokenizer with gpt-tokenizer.

[Request]: Template Strings for Preamble

Is your feature request related to a problem? Please describe.

When establishing a preamble, there are certain strings that would be helpful to be able to have templatized like today's date.

Describe the solution you'd like

A simple template syntax like %today% or {today} that runs the formatDate() utility and injects the current date into the preamble.

[BUG]: Chat Scrolling Broke when Streaming Responses were Introduced

Describe the bug:

When streaming responses were introduced, the scroll-to-bottom behavior of the chat window stopped working as expected due to the streaming response being updated as a separate prop and the scrolling logic being based on the overall conversation length, which only gets updated when the streaming response is complete.

The scrolling logic needs to take the streaming response into account and continue scrolling to the bottom while the streaming response is rendering.

[Request]: Integrate manifest-beta.json for preview releases

Is your feature request related to a problem? Please describe.

New versions can no longer be installed via BRAT prior to a General Availability release.

Describe the solution you'd like

Implement the manifest-beta.json functionality from BRAT into a Preview Release workflow similar to the existing Release workflow

Describe alternatives you've considered

It's still possible to test new versions manually via cloning the branch and manually adding the plugin to Obsidian, but that is less than ideal.

Additional context

BRAT gives developers and beta testers easier access to beta releases of the plugin and should be considered part of the Pull Request review lifecycle prior to merging changes into main and triggering a release.

Follow semver and use a format like X.Y.Z-beta+${COMMIT_SHA}.${WORKFLOW_RUN} for these preview releases.

Notes:

  • The X.Y.Z semver version should be incremented by the appropriate value for the changes included in this version based on the conventional commit and semantic release standards this repository follows
  • The workflow run number is useful in case of force pushing or manually re-running a GitHub Action.

Secure Storage of OpenAI API Key

Obsidian currently does not have a good way to ensure that secrets like API keys are stored securely.

In this case "good" is defined as cross-platform, secure storage of a string that prevents access from any unauthorized or unexpected actors.

By default, many plugins store things like API Keys in plaintext in the data.json, which means that any plugin with access to the Obsidian object, and any code with access to the user's filesystem, has access to the API Key.

This plugin, the Obsidian AI Research Assistant, also currently stores the user's OpenAI API Key in this way - which is why it hasn't been submitted to the Community Plugins listing yet.

Electron provides a safeStorage method that Obsidian exposes to us via the safeStorage API, but from my understanding this still allows other plugins to call safeStorage.decryptString().

Given that eventually this plugin wants to support mobile, there needs to a be a longer term solution for this, but temporarily, we should move to using safeStorage for at least a slightly more secure implementation.

We should also add a warning to the plugin Settings interface that lets the user know that they need to be wary of what other plugins they install might be doing in terms of calling decryptString() on these API keys.

Maybe we can find a way to monkey patch the decryptString method to require consent from the user to decrypt the requested string?

[Request]: could I talk with my notes recorded in obsidian ?

Is your feature request related to a problem? Please describe. A clear and concise description
compared to talk with ai, talking with ai + note is more helpful for learning.

Describe the solution you'd like A clear and concise description of what you want to happen.
give personal notes data to ai ,and ai could answer my question based on the data.

[Request]: Implement Streaming Responses

Is your feature request related to a problem? Please describe.

Responses take too long to deliver to the UI.

Describe the solution you'd like

Now that OpenAI has added streaming support to the openai npm package, switch to streaming responses to the UI.

[Request]: Ingest ChatGPT Conversation JSON

Is your feature request related to a problem? Please describe.
I frequently use ChatGPT and export my chat sessions as JSON files. Currently, there's no easy way to integrate these exported chat histories into the Obsidian AI Research Assistant's chat history format.

Describe the solution you'd like
I would like a feature within the Obsidian AI Research Assistant that allows users to import ChatGPT data export JSON files. This feature should convert the ChatGPT chat format into the AI Research Assistant's chat history format, enabling users to view and analyze all their past ChatGPT sessions seamlessly within Obsidian.

For a detailed structure of the ChatGPT JSON data export, you can refer to this JSON schema.

Describe alternatives you've considered
An alternative would be to manually convert the ChatGPT JSON data into the format supported by the AI Research Assistant. However, this can be time-consuming and prone to errors, especially for long chat histories.

Additional context
Integrating this feature will significantly enhance the user experience for those who actively use both ChatGPT and the Obsidian AI Research Assistant, making it easier to manage and review past interactions.

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.