feat: add fastapi-ai-guardrails extension (fixes #82) - #196
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @emberb170d, thanks for taking on #82! I reviewed the branch — the extension structure itself follows the authoring contract well (
Once the body is accurate, the branch is rebased, and the scope is focused on Also — we'd love to have you in the community Discord where contributors coordinate and get early feedback on extension PRs: https://discord.gg/bR5VyATgka — hope to see you there! 🙌 |
- Add input/output guardrail hooks with typed validation - Include default rules: max length, blocked patterns, required fields - Add comprehensive test suite - Add documentation: README, guide, env config - Follow CPA extension template conventions
8d54243 to
0bb4f8d
Compare
feat: add fastapi-ai-guardrails extension (fixes #82)
Problem
Applications using FastAPI often need input validation, output validation, and
structured error handling. Currently, these concerns are either duplicated across
projects or implemented inconsistently.
Solution
Create
extensions/fastapi-ai-guardrailsthat provides:Key Features
.env.example.appendfastapi-backendChanges Made
extensions/fastapi-ai-guardrails/directory with complete extension structureapp/core/guardrails.pywith typed validation functionstemplate/docs/FASTAPI_GUARDRAILS_GUIDE.mdtemplate/tests/pyproject.tomlThis extension addresses issue #82 by providing a reusable AI application concern
that can be composed with FastAPI backends without duplicating validation logic.
Fixes #82
Closes #82