Skip to content

v0.1.3

Latest

Choose a tag to compare

@kkumar30 kkumar30 released this 23 Dec 03:47
· 2 commits to main since this release

Full Changelog: 0.1.2...0.1.3

Changelog

All notable changes to this project will be documented in this file.

v0.1.3 (2025-12-22)

Added

  • SYSTEM_GUARDRAIL to enforce strict rules for handling untrusted data in LLM prompts.
  • Support for flexible input types (dict, DataFrame, str) in generate_wrapped.
  • JSON serialization of input data to prevent prompt injection.
  • Explicit data delimiters (<DATA></DATA>) in prompts for safety.
  • Optional user-provided model_api_url, model_api_key, and model_name.

Changed

  • generate_wrapped function now normalizes inputs and applies system guardrails automatically.
  • Model.call_model updated to pass SYSTEM_GUARDRAIL for both OpenAI (system role) and Anthropic (system top-level field).
  • Anthropic response parsing updated for messages array format.
  • OpenAI and Anthropic defaults unified and made explicit for safety.

Fixed

  • Prevented prompt injection vulnerabilities by:
    • Serializing user data
    • Enforcing system-level guardrails
    • Ignoring instructions inside input data

Docs

  • Updated How it Works section to clarify system token handling.
  • Added clear guidelines for structured data input and expected output style.