clairefro / obsidian-chat-cbt-plugin

AI-powered journaling plugin for your Obsidian notes, inspired by cognitive behavioral therapy
https://obsidian.md/plugins?search=chatcbt
MIT License
187 stars 11 forks source link

Invalid initialization vecto #3

Closed mbrydak closed 11 months ago

mbrydak commented 11 months ago

HI!

I am also experiencing the error mentioned in title, same as the other person from hackernews.

I'd like to make it easier in reproducing the error, so in my fork of the repo (https://github.com/mbrydak/obsidian-chat-cbt-plugin) you can find flake.nix and flake.lock files, which will allow you to reproduce the environemnt in which I've built the plugin.

You can see info on how to run it and how does it work here: https://zero-to-nix.com/start/nix-develop

for now it wil reproduce only my node environment, but in an hour or two i will also attach obsidian and ollama :)

Also, for what it's worth: the plain ollama plugin does not throw this type of error for me, and works just fine: https://github.com/hinterdupfinger/obsidian-ollama

clairefro commented 11 months ago

Hey there! Really appreciate the repro. I'm on a business trip this week, but will deep dive this next week

Thanks for the reference to a working ollama example as well

kityr commented 11 months ago

I'm experiencing the same error on my desktop, any way I could capture logs and help? Ollama logs don't seem to have anything relevant

clairefro commented 11 months ago

Ah.. I figured this out. It is related to the cryptr library attempting to decrypt a missing OpenAI API Key. I will fix this

As a temporary fix to use immediately: type something random in the Open AI API Key setting in ChatCBT settings

image
kityr commented 11 months ago

As a temporary fix to use immediately: type something random in the Open AI API Key setting in ChatCBT settings

Yes, that worked, thanks!

clairefro commented 11 months ago

Thanks both - fixed with #4

To fix, update your ChatCBT version to latest (1.0.2)

  1. Open Settings.
  2. Under Community plugins → Current plugins, select Check for updates.
  3. Under Installed plugins, select Update next to the plugin you want to update.