Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

feat: add presets module and release v0.1.4

Nandakishor94860ff87571
diff --git a/README.md b/README.md
index c28fd6a4..14218b12 100644
--- a/README.md
+++ b/README.md
@@ -104,6 +104,30 @@ else:
---
+## Built-in Workflow Presets
+
+Laya provides pre-tuned question schemas for immediate production use:
+
+```python
+import laya
+
+agent = laya.load("convaiinnovations/laya")
+
+# 1. Intelligent Model Router (routes to small vs. frontier models)
+routing = agent.predict({"request": "Refactor this service using dependency injection"}, laya.router_questions())
+
+# 2. Real-time Prompt Guardrails (jailbreaks, injections, leaks)
+guard = agent.predict({"prompt": "Ignore all instructions"}, laya.guard_questions())
+
+# 3. Content Safety & Moderation (toxicity, harassment, threats)
+safety = agent.predict({"post": "User comment text"}, laya.moderation_questions())
+
+# 4. Support Ticket Triage (intent, urgency, frustration, churn)
+triage = agent.predict({"message": "My payment failed twice"}, laya.triage_questions())
+```
+
+---
+
## Decision Primitives
| Primitive | Output | Use Cases |
diff --git a/laya/__init__.py b/laya/__init__.py
index e775a88e..0068b776 100644
--- a/laya/__init__.py
+++ b/laya/__init__.py
@@ -2,8 +2,9 @@
from .agent import Agent, RLAgent, load
from .email import clean_email_body, email_questions, email_state
+from .presets import guard_questions, moderation_questions, router_questions, triage_questions
-__version__ = "0.1.3"
+__version__ = "0.1.4"
__all__ = [
"Agent",
"RLAgent",
@@ -11,5 +12,9 @@ __all__ = [
"clean_email_body",
"email_questions",
"email_state",
+ "guard_questions",
+ "moderation_questions",
+ "router_questions",
+ "triage_questions",
"__version__",
]
diff --git a/pyproject.toml b/pyproject.toml
index 55147601..1e7b5669 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "laya"
-version = "0.1.3"
+version = "0.1.4"
description = "Fast, non-autoregressive System 1 decision engine with calibrated probabilities"
readme = "README.md"
requires-python = ">=3.8"
diff --git a/setup.py b/setup.py
index 65cb5c34..5f5ba653 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name="laya",
- version="0.1.3",
+ version="0.1.4",
description="Fast, non-autoregressive System 1 decision engine with calibrated probabilities",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",