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

[plock-1]: add settings file #4

Merged
merged 3 commits into from
Jan 22, 2024
Merged

[plock-1]: add settings file #4

merged 3 commits into from
Jan 22, 2024

Conversation

jasonjmcghee
Copy link
Owner

@jasonjmcghee jasonjmcghee commented Jan 22, 2024

Adds a settings.json file to configure instead of hardcoded vars.

Built to be compatible with a svelte front-end once that's built

Allows for this kind of setup:

{
  "environment": {},
  "ollama": {
    "enabled": true,
    "ollama_model": "openhermes2.5-mistral"
  },
  "custom_commands": {
    "index": 0,
    "custom_commands": [
      {
        "name": "gpt",
        "command": [
          "bash",
          "/Users/jason/workspace/plock/scripts/gpt.sh"
        ]
      }
    ]
  },
  "custom_prompts": {
    "basic_index": 0,
    "with_context_index": 1,
    "custom_prompts": [
      {
        "name": "default basic",
        "prompt": "Say hello, then {}"
      },
      {
        "name": "default with context",
        "prompt": "I will ask you to do something. Below is some extra context to help do what I ask. --------- {} --------- Given the above context, please, {}. DO NOT OUTPUT ANYTHING ELSE."
      }
    ]
  },
  "shortcuts": {
    "basic": "CmdOrControl+Shift+.",
    "with_context": "CmdOrControl+Shift+/"
  }
}

Why are there multiple prompts and commands?
Future-proofing, so we can select them from a list.

Can be dynamically loaded at any time:
image

@jasonjmcghee jasonjmcghee merged commit ce1c79c into main Jan 22, 2024
@jasonjmcghee jasonjmcghee mentioned this pull request Jan 23, 2024
@jasonjmcghee jasonjmcghee deleted the plock-1-settings branch January 24, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant