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

Introduce "none" LLM provider for execution control #1163

Merged
merged 1 commit into from
Feb 21, 2025
Merged

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Feb 21, 2025

Add a new "none" model to prevent LLM execution, enhancing control over script execution with error logging capabilities. This model is useful for scenarios where inline prompts are used exclusively.


Summary of Changes

  • Introduced the none model provider:

    • Prevents LLM execution, useful for top-level scripts relying solely on inline prompts.
    • Returns an error indicating no LLM execution is allowed in this context.
  • 🛠️ Enhanced parseTokenFromEnv logic:

    • Added support for the none provider alongside echo.
  • 📚 Documentation Updates:

    • Updated the "Echo" provider section with additional debugging details.
    • Added a new section for the none provider, explaining its purpose and usage.
  • 🗂️ New Model Implementation:

    • Added NoneModel with a custom completer to handle scenarios where LLM execution is disabled.
  • 🚀 Extended Model Resolution:

    • Integrated NoneModel into the language model resolution logic.
  • 🛡️ Updated llms.json Configuration:

    • Registered the none provider with relevant metadata, marking it as hidden and tokenless.

These changes enhance debugging capabilities and provide a mechanism to disable LLM execution when necessary.

AI-generated content by prd may be incorrect

Added a new "none" model to block LLM execution with error logging.
@pelikhan pelikhan merged commit 9f9e97e into main Feb 21, 2025
16 checks passed
@pelikhan pelikhan deleted the none_provider branch February 21, 2025 16:24
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.

1 participant