Skip to content

feat: add lettucedetect CLI entry point (#47)#59

Open
SemTiOne wants to merge 1 commit into
KRLabsOrg:mainfrom
SemTiOne:feat/cli-entry-point
Open

feat: add lettucedetect CLI entry point (#47)#59
SemTiOne wants to merge 1 commit into
KRLabsOrg:mainfrom
SemTiOne:feat/cli-entry-point

Conversation

@SemTiOne

Copy link
Copy Markdown

Closes #47

Adds a lettucedetect console script wrapping HallucinationDetector.

  • lettucedetect/cli.py --> argparse CLI, supports file/stdin/literal for context and answer
  • pyproject.toml --> register entry point under [project.scripts]
  • tests/test_cli_pytest.py --> 35 unit tests

- Add lettucedetect/cli.py with argparse-based CLI wrapping HallucinationDetector
- Support --model, --context, --answer, --question, --format, --method flags
- Context and answer accept file paths, literal strings, or '-' for stdin
- Multi-passage context split on blank lines
- Register lettucedetect = lettucedetect.cli:main in pyproject.toml
- Add tests/test_cli_pytest.py with 35 unit tests

Closes KRLabsOrg#47
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.

Add a lettucedetect command-line entry point

1 participant