Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Module prompt #81

Merged
merged 5 commits into from
Nov 25, 2024
Merged

Module prompt #81

merged 5 commits into from
Nov 25, 2024

Conversation

lukehinds
Copy link

@lukehinds lukehinds commented Nov 25, 2024

Modular Prompt System

Add the ability to create prompts outside of the code and inject new prompts
via the CLI or config

  • Add prompts/default.yaml with built-in system prompts
  • Implement PromptConfig for managing prompts configuration
  • Add support for loading prompts from YAML files
  • Support overriding prompts via CLI, env vars, and config
  • Add comprehensive test coverage for prompts functionality
  • Move ConfigurationError to separate exceptions module
  • Update CLI to display number of loaded prompts

The modular prompts system allows users to:

  • Use default stacklok prompts from prompts/default.yaml

  • Override with custom prompts via --prompts flag

  • Define prompts inline in config.yaml

  • Set prompts via CODEGATE_PROMPTS_FILE env var

    Tests: ✅ 44 passing (78% coverage)

Luke Hinds added 5 commits November 25, 2024 12:48
* Add prompts/default.yaml with built-in system prompts
* Implement PromptConfig for managing prompts configuration
* Add support for loading prompts from YAML files
* Support overriding prompts via CLI, env vars, and config
* Add comprehensive test coverage for prompts functionality
* Move ConfigurationError to separate exceptions module
* Update CLI to display number of loaded prompts

The modular prompts system allows users to:

* Use default stacklok prompts from prompts/default.yaml
* Override with custom prompts via --prompts flag
* Define prompts inline in config.yaml
* Set prompts via CODEGATE_PROMPTS_FILE env var

Tests: ✅ 44 passing (78% coverage)
@lukehinds lukehinds requested a review from jhrozek November 25, 2024 13:32
@lukehinds lukehinds added this to the 0.1.0 (flagship) milestone Nov 25, 2024
@lukehinds lukehinds linked an issue Nov 25, 2024 that may be closed by this pull request
@lukehinds lukehinds removed this from the 0.1.0 (flagship) milestone Nov 25, 2024
@lukehinds lukehinds merged commit 8febe0a into main Nov 25, 2024
2 checks passed
@lukehinds lukehinds deleted the module-prompt branch November 25, 2024 18:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modular Prompt System
2 participants