LLM plugin to generate few-shot prompts for plugin creation
Project description
llm-plugin-generator
LLM plugin to generate few-shot prompts for plugin creation
Installation
Install this plugin in the same environment as LLM:
llm install llm-plugin-generator
Usage
To generate a new LLM plugin, use the generate-plugin
command:
llm generate-plugin "Description of your plugin"
Options:
PROMPT
: Description of your plugin (optional)INPUT_FILES
: Path(s) to input README or prompt file(s) (optional, multiple allowed)--output-dir
: Directory to save generated plugin files (default: current directory)--type
: Type of plugin to generate (default, model, or utility)--model
,-m
: Model to use for generation--reasoning
: Reasoning level for the AI (1-9)
Examples:
- Basic usage:
llm generate-plugin "Create a plugin that translates text to emoji" --output-dir ./my-new-plugin --type utility --model gpt-4
- Using a prompt and input files - Generating plugin from a README.md
llm generate-plugin "Few-shot Prompt Generator. Call it llm-few-shot-generator" 'files/README.md' --output-dir plugins/Utilities/few-shot-generator --type utility -m claude-3.5-sonnet
This will generate a new LLM plugin based on the provided description and/or input files. The files will be saved in the specified output directory.
Features
- Generates fully functional LLM plugins based on descriptions or input files
- Supports different plugin types: default, model, and utility
- Uses few-shot learning with predefined examples for better generation
- Allows specifying custom output directory
- Compatible with various LLM models
- Generates main plugin file, README.md, and pyproject.toml
- Extracts plugin name from generated pyproject.toml for consistent naming
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-plugin-generator
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Contributing
Contributions to llm-plugin-generator are welcome! Please refer to the GitHub repository for more information on how to contribute.
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llm_plugin_generator-0.1.2.tar.gz
.
File metadata
- Download URL: llm_plugin_generator-0.1.2.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90101860d6d62913e9b1901828cc4bf4ec4adb058f0b9968430c60882fc2358d |
|
MD5 | 52889532cc5745dfd3020e741ad3c98e |
|
BLAKE2b-256 | cf40f72e160b3302a461b0ab979bcae30039d4c912e346bfba566dec50ac6f17 |
File details
Details for the file llm_plugin_generator-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: llm_plugin_generator-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8828eddf8764314c3470d9bd8f687a5ec42bd5351b8a0bfe4471a5b67ac51c18 |
|
MD5 | abb30118e9fa608e5052dff240196f9b |
|
BLAKE2b-256 | dde290ca463f41ade4b3ee58df79a1a145a1cda00d7167567d8155146b4e0822 |