This is something I’ve been working on for a few days and have already shared on the discord (thanks for the feedback there!). I feel like this plug is at a point where it’s usable enough if others want to try it out:
(Please backup your space! This does insert and replace text, so better to be safe than risk your data)
It’s still pretty early, but here are a few things it can do:
Create and insert a summary of either selected text or the whole note
Generate tags for a note and set them in the frontmatter
Generate images using Dall-E and save them locally
Send selected text (or the note) and use it as a user prompt, putting the response in the open note
Have an interactive user/assistant chat inside of a note so you can keep your chat history in SB
Support for changing the openai base url, allowing local LLMs - I’ve only tested this briefly with Ollama so far
The readme has a list of available commands available through the command palette. There are no slash commands or keyboard shortcuts yet, but I’m open to suggestions for them.
Here’s an example of the chat feature:
On a side-note: I’m not really a javascript dev, so I’d be more than happy if anyone wants to help make it better. Feel free to suggest changes/features/etc too.
Overall I’d rather support one type of API, but I do plan on adding support for configuring multiple models and switching between them, so I’ll do some planning around how that could extend to different APIs too if there’s demand for it
And once you change either of those files, you’ll probably need to run the “System: Reload” command and/or do a hard refresh so it picks up the new settings.
Right now, the only thing required in SECRETS is that OPENAI_API_KEY. Even for Ollama.
One thing I noticed is that running the “System: Reload” command doesn’t seem to be enough for settings changes to take effect. It seems like I need to run both “System: Reload” and then do a hard refresh of the page I’m on. Can you give that a try?
For Ollama, can you try these settings (with the /v1 on the end of the url)?
I should make this easier, but that command expects the page to look like this:
**user**: What's the population of new york?
To get it to work on an existing page, basically just add **user**: <your query> to the bottom of the page. It’ll ignore anything above the first **user**: it finds though.
Can you check if the javascript console has any errors in it? If there’s an error, it’ll log it to the console but doesn’t flash a notification on the page currently
Thanks a lot! Ollama still does not respond for me, but it might have to do with my machine. Anyway, mistral works great and it is relatively cheap, so I am covered
Let me just bump this one for visibility. @justyns is just doing an amazing job progressing on this project. There’s just so much opportunity in this one that I wish I had more time to play with it.
Note there’s a whole website (published using silverbullet-pub) as well:
It’s in the main branch, but I haven’t made a release yet since I’ll be out of town for a few days and want to make sure nothing’s going to blow up. If anyone is interested in testing out these changes, please feel free!
One of the features I’m pretty excited about is enabling RAG in the chat mode, so I can ask about things without having to actually link directly to a note now.