Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions scripts/ingest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ for arg in "$@"; do
echo "Ingest a document into Vektra."
echo ""
echo "Arguments:"
echo " FILE Path to the document (PDF, DOCX, PPTX)"
echo " FILE Path to the document (PDF, DOCX, PPTX, MD)"
echo " NAMESPACE Target namespace (default: 'default')"
echo ""
echo "Environment:"
Expand Down Expand Up @@ -62,7 +62,7 @@ case "${FILENAME##*.}" in
pdf) CONTENT_TYPE="application/pdf" ;;
docx) CONTENT_TYPE="application/vnd.openxmlformats-officedocument.wordprocessingml.document" ;;
pptx) CONTENT_TYPE="application/vnd.openxmlformats-officedocument.presentationml.presentation" ;;
md) CONTENT_TYPE="text/markdown" ;;
md|markdown) CONTENT_TYPE="text/markdown" ;;
*) CONTENT_TYPE="application/octet-stream" ;;
esac

Expand Down
6 changes: 4 additions & 2 deletions vektra-core/src/vektra_core/safeguards/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def create_safeguard(mode: str, *, pii_chunk_threshold: int = 3) -> SafeguardHoo
Returns:
A SafeguardHook implementation.
"""
if mode == "presidio":
normalized = mode.strip().lower()

if normalized == "presidio":
try:
from vektra_core.safeguards.presidio import PresidioPIISafeguard

Expand All @@ -37,7 +39,7 @@ def create_safeguard(mode: str, *, pii_chunk_threshold: int = 3) -> SafeguardHoo
)
return PassthroughSafeguard()

if mode != "passthrough":
if normalized != "passthrough":
log.warning("safeguard_unknown_mode", mode=mode, fallback="passthrough")

return PassthroughSafeguard()
1 change: 1 addition & 0 deletions vektra-learn/src/vektra_learn/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class TokenRequest(BaseModel):
course_id: str = Field(min_length=1, max_length=255)
namespace: str | None = Field(
default=None,
min_length=1,
max_length=64,
description="Override namespace in JWT. When omitted, course_id is used as namespace convention.",
)
Expand Down
Loading