Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamped Settings, Editable Commands, Custom Prompt #29

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

JPW03
Copy link

@JPW03 JPW03 commented Jun 2, 2024

This is a really useful plugin but some of the settings leave much to be desired.

Global Command Setting Changes

image

  • Ollama needs to be running and connected for the settings to open. You can easily test connection using the refresh button next to the URL.
    • If you can't connect, it will look like this:
      image
  • The default model is a drop down which fetches the list of installed models. (Resolves feature request: add support for selecting LLM #22 )
  • Added "Prompt Template", which is a wrapper around command prompts.
    • Inspired by how all the default commands used a common start and end sentence.
  • Added "Model Template", which is literally the template parameter of the API request sent to Ollama during a prompt. It will contain model specific tokens so its default value is empty, but the README provides an example llama3 model template.
    • Model template is only applied to the default model (this is mostly due to my own oversight but I figured because most people will only use 1 model, that I wouldn't bother adding settings for model specific templates used in commands which don't use the default model).
      • Sidenote, through experimentation and using the same model template as the README, specifying the text separately in the model template with an empty prompt template yielded similar conciseness to just using the default prompt template. Not relevant to my changes, but I thought it was useful information.

Command Specific Settings

  • "Ignore prompt template?" toggle for each command (self-explanatory)
  • Better explanation of what temperature does.
  • Existing commands can be edited (resolves Feature request: Change the prompt/model without needing to recreate the prompt #13 )
    image
  • You can select "Default" as the model for a command.
  • Removed the "Update Default Commands" setting as it didn't work and I couldn't get the DEFAULT_SETTINGS object to be overwritten between reloads of Obsidian.

Custom Prompt Command

  • Added a command "Custom prompt" which opens a form for entering a one-time custom prompt which uses the default temperature and model.
    image
    • There is a ribbon button for this command
      image
  • Added a command "Save custom prompt" which saves the previous custom prompt to its own command.

Misc Changes

P.S. the manifest.json will need to be changed back to "Ollama" after merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant