Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Prompt Secure
# Contributing to Compliant LLM

Thank you for considering contributing to Prompt Secure! This document outlines the process for contributing to the project.
Thank you for considering contributing to Compliant LLM! This document outlines the process for contributing to the project.

## Code of Conduct

Expand Down Expand Up @@ -35,8 +35,8 @@ By participating in this project, you agree to abide by our Code of Conduct.

1. Clone the repository
```bash
git clone https://github.com/yourusername/prompt_secure.git
cd prompt_secure
git clone https://github.com/fiddlecube/compliant-llm.git
cd compliant-llm
```

2. Create a virtual environment
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ Prompt Secure helps developers evaluate the robustness of their AI assistant sys
### Using pip

```bash
pip install prompt_secure
pip install -i https://test.pypi.org/simple/ compliant-llm
```

### From source

```bash
git clone https://github.com/yourusername/prompt_secure.git
cd prompt_secure
git clone https://github.com/fiddlecube/compliant-llm.git
cd compliant-llm
pip install -e .
```

Expand Down Expand Up @@ -93,8 +93,8 @@ More details in documentation folder.
### Development Installation

```bash
git clone https://github.com/yourusername/prompt_secure.git
cd prompt_secure
git clone https://github.com/fiddlecube/compliant-llm.git
cd compliant-llm

pip install -r requirements.txt

Expand Down Expand Up @@ -332,8 +332,8 @@ output:
## Docker

```bash
docker build -t prompt_secure .
docker run -p 8501:8501 prompt_secure
docker build -t compliant_llm .
docker run -p 8501:8501 compliant_llm
```

## Contributing
Expand Down
85 changes: 85 additions & 0 deletions UV_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Migration Guide: pyenv to uv

This guide will help you migrate from pyenv to uv for Python environment and package management.

## What is uv?

uv is a modern Python package installer and resolver written in Rust. It's designed to be a faster, more reliable alternative to pip and other Python package managers.

## Migration Steps

### 1. Virtual Environment Management

**With pyenv (old way):**
```bash
# Create a virtual environment
pyenv virtualenv 3.11.4 my-project-env
# Activate the environment
pyenv activate my-project-env
```

**With uv (new way):**
```bash
# Create a virtual environment
uv venv .venv
# Activate the environment
source .venv/bin/activate
```

### 2. Package Installation

**With pip (old way):**
```bash
pip install -e .
pip install -e ".[dev]"
```

**With uv (new way):**
```bash
uv pip install -e .
uv pip install pytest flake8 black mypy # Install dev dependencies
```

### 3. Managing Dependencies

**With pip (old way):**
```bash
pip freeze > requirements.txt
pip install -r requirements.txt
```

**With uv (new way):**
```bash
# Generate a lock file
uv pip freeze > requirements-lock.txt
# Install from lock file
uv pip install -r requirements-lock.txt
```

## Workflow Changes

1. **Environment Activation**: Use `source .venv/bin/activate` instead of `pyenv activate`
2. **Package Installation**: Use `uv pip install` instead of `pip install`
3. **Dependency Management**: Use `uv pip freeze` and `uv pip install -r` for dependency management

## Benefits of uv

- **Speed**: uv is significantly faster than pip for package installation and resolution
- **Reliability**: Better dependency resolution with fewer conflicts
- **Compatibility**: Works with existing Python projects and tools
- **Modern Features**: Better caching, parallel downloads, and more

## Additional uv Commands

- `uv pip list` - List installed packages
- `uv pip uninstall <package>` - Uninstall a package
- `uv pip show <package>` - Show information about a package
- `uv pip check` - Verify installed packages have compatible dependencies

## Troubleshooting

If you encounter any issues with the migration, try the following:

1. Ensure you're using the latest version of uv: `uv --version`
2. If a package fails to install, try installing it with `--no-binary`: `uv pip install --no-binary :all: <package>`
3. For any compatibility issues, you can always fall back to pip within the virtual environment: `pip install <package>`
8 changes: 4 additions & 4 deletions cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def dict_to_cli_table(
# Package configs
os.path.join(os.path.dirname(os.path.dirname(__file__)), "configs"),
# User configs
os.path.expanduser(os.path.join("~", ".config", "prompt_secure")),
os.path.expanduser(os.path.join("~", ".config", "compliant-llm")),
# Project configs (current directory)
os.path.join(os.getcwd(), ".prompt_secure")
os.path.join(os.getcwd(), ".compliant-llm")
]


Expand Down Expand Up @@ -460,9 +460,9 @@ def config(list, show, validate):
# Package configs
os.path.join(os.path.dirname(os.path.dirname(__file__)), "configs"),
# User configs
os.path.expanduser(os.path.join("~", ".config", "prompt_secure")),
os.path.expanduser(os.path.join("~", ".config", "compliant-llm")),
# Project configs (current directory)
os.path.join(os.getcwd(), ".prompt_secure")
os.path.join(os.getcwd(), ".compliant-llm")
]

for config_dir in config_dirs:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.8'

services:
prompt_secure:
compliant_llm:
build: .
ports:
- "8001:8001"
Expand Down
14 changes: 7 additions & 7 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Getting Started with Prompt Secure
# Getting Started with Compliant LLM

Prompt Secure is a tool designed to evaluate the robustness of AI system prompts against various types of attacks and edge cases.
Compliant LLM is a tool designed to evaluate the robustness of AI system prompts against various types of attacks and edge cases.

## Installation

### Using pip
```bash
pip install prompt_secure
pip install -i https://test.pypi.org/simple/ compliant-llm
```

### From source
```bash
git clone https://github.com/yourusername/prompt_secure.git
cd prompt_secure
git clone https://github.com/fiddlecube/compliant-llm.git
cd compliant-llm
pip install -e .
```

Expand All @@ -37,13 +37,13 @@ OPENAI_API_KEY=your_api_key_here
3. Run the tool:

```bash
prompt_secure test --config configs/your_config.yaml
compliant-llm test --config configs/your_config.yaml
```

4. View the results:

```bash
prompt_secure ui
compliant-llm ui
```

## Next Steps
Expand Down
8 changes: 4 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This guide provides instructions for installing Prompt Secure on your system.
The simplest way to install Prompt Secure is using pip:

```bash
pip install prompt_secure
pip install -i https://test.pypi.org/simple/compliant-llm
```

### Installing from Source
Expand All @@ -24,8 +24,8 @@ For the latest development version or to contribute to the project, you can inst

```bash
# Clone the repository
git clone https://github.com/yourusername/prompt_secure.git
cd prompt_secure
git clone https://github.com/fiddlecube/compliant-llm.git
cd compliant-llm

# Install in development mode
pip install -e .
Expand Down Expand Up @@ -111,7 +111,7 @@ pip install -e ".[all]"
If you encounter permission errors, you may need to use `sudo` or install in user mode:

```bash
pip install --user prompt_secure
pip install -i https://test.pypi.org/simple/ compliant-llm
```

#### API Connection Issues
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "prompt_secure"
name = "compliant-llm"
version = "0.1.0"
description = "Tool for testing AI system prompts against various attack vectors"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
authors = [
{name = "Prompt Secure Contributors", email = "[email protected]"},
{name = "Compliant LLM Contributors", email = "[email protected]"},
]
dependencies = [
"pyyaml",
Expand Down
85 changes: 85 additions & 0 deletions requirements-lock.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
aiofiles==24.1.0
aiohappyeyeballs==2.6.1
aiohttp==3.11.18
aiosignal==1.3.2
altair==5.5.0
annotated-types==0.7.0
anyio==4.9.0
attrs==25.3.0
black==25.1.0
blinker==1.9.0
cachetools==5.5.2
certifi==2025.4.26
charset-normalizer==3.4.2
click==8.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this file go in git?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. this functions like npm's package-lock.json, enabling uv to cache and reuse dependencies.

also, ensures that all dev builds and prod builds use the exact same version of packages.

distro==1.9.0
filelock==3.18.0
flake8==7.2.0
frozenlist==1.6.0
fsspec==2025.5.0
gitdb==4.0.12
gitpython==3.1.44
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
huggingface-hub==0.31.4
idna==3.10
importlib-metadata==8.7.0
iniconfig==2.1.0
jinja2==3.1.6
jiter==0.10.0
jsonschema==4.23.0
jsonschema-specifications==2025.4.1
litellm==1.70.0
markdown-it-py==3.0.0
markupsafe==3.0.2
mccabe==0.7.0
mdurl==0.1.2
multidict==6.4.4
mypy==1.15.0
mypy-extensions==1.1.0
narwhals==1.40.0
numpy==2.2.6
openai==1.75.0
packaging==24.2
pandas==2.2.3
pathspec==0.12.1
pillow==11.2.1
platformdirs==4.3.8
pluggy==1.6.0
-e file:///Users/kaushik/Code/fc/compliant-llm
propcache==0.3.1
protobuf==6.31.0
pyarrow==20.0.0
pycodestyle==2.13.0
pydantic==2.11.4
pydantic-core==2.33.2
pydeck==0.9.1
pyflakes==3.3.2
pygments==2.19.1
pytest==8.3.5
python-dateutil==2.9.0.post0
python-dotenv==1.1.0
pytz==2025.2
pyyaml==6.0.2
referencing==0.36.2
regex==2024.11.6
requests==2.32.3
rich==14.0.0
rpds-py==0.25.0
six==1.17.0
smmap==5.0.2
sniffio==1.3.1
streamlit==1.45.1
tenacity==9.1.2
tiktoken==0.9.0
tokenizers==0.21.1
toml==0.10.2
tornado==6.5
tqdm==4.67.1
typing-extensions==4.13.2
typing-inspection==0.4.0
tzdata==2025.2
urllib3==2.4.0
yarl==1.20.0
zipp==3.21.0
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

setup(
name='prompt_secure',
name='compliant-llm',
version='0.1.0',
packages=find_packages(),
install_requires=[
Expand Down Expand Up @@ -31,12 +31,12 @@
],
},
python_requires='>=3.9',
author='Prompt Secure Contributors',
author='Compliant LLM Contributors',
author_email='[email protected]',
description='Tool for testing AI system prompts against various attack vectors',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://github.com/yourusername/prompt_secure',
url='https://github.com/fiddlecube/compliant-llm',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
Expand Down
2 changes: 1 addition & 1 deletion ui/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def create_dashboard():
uploaded_file = st.sidebar.file_uploader(
"Choose a JSON report",
type=['json'],
help="Upload the JSON report generated by prompt_secure"
help="Upload the JSON report generated by compliant-llm"
)

# Default report path
Expand Down