Rsazure-openai-toolkit

Latest version: v0.5.1

Safety actively analyzes 722460 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.5.1

Added
- Added `__version__ = "0.5.1"` to the main `__init__.py` file
- Enables programmatic access via `rsazure_openai_toolkit.__version__`

Changed
- Bumped version to 0.5.1
___

0.5.0

Added
- `SessionContext`: full support for context window management with automatic disk persistence
- Saves message history per session (via `session_id`)
- Supports context trimming by message count (`max_messages`) or token budget (`max_tokens`)
- Automatically emits user warnings when trimming occurs
- Metadata file (`.meta.json`) tracks system prompt, creation time, and session config
- Auto-backup of `meta.json` before overriding system prompt or config
- Full history stored in `.full.jsonl`, even if trimmed from active context
- Integrated with CLI (`rschat`) via environment variables
- New documentation file: `docs/session_context.md`

Changed
- `rschat` CLI now prints:
- Previous message count and total context size when using session
- Active system prompt from the loaded context
- Config mismatch alerts (e.g., deployment or token limits)
- Enhanced safety checks for accidental system prompt or config overrides
- Bumped version to 0.5.0
___

0.4.1

Added
- Modular documentation structure in `docs/`
- Dedicated files for CLI, config, usage, logging, and troubleshooting
- Improved `troubleshooting.md` with detailed error handling tips

Changed
- Simplified and reorganized `README.md` for PyPI compatibility
- Added inline official PyPI/GitHub badges next to project name
- Improved visual layout of badge groups for clarity and aesthetics
- Bumped version to 0.4.1

Fixed
- Broken internal links in PyPI view (now absolute GitHub links)
___

0.4.0

Added
- `InteractionLogger`: a flexible and transparent logging system for model interactions
- Supports `jsonl` and `csv` formats
- Logging is fully opt-in via `RSCHAT_LOG_MODE` and `RSCHAT_LOG_PATH`
- Includes timestamps, prompts, tokens, model config, and raw API response
- `get_model_config()`: utility function to build model parameters with optional overrides and default values
- Supports `temperature`, `max_tokens`, `seed`, and others
- Provides a clean and traceable way to manage generation config
- Full input/output/total token tracking from the OpenAI API (with fallback)
- CLI (`rschat`) now prints:
- Assistant response
- Token usage (input, output, total)
- Model used
- Seed (if provided)
- Elapsed time
- Added `seed` support for reproducible outputs
- Updated all example templates to use the new architecture
- Now print response info and optionally log interactions
- Use `get_model_config()` for generation parameters
- Logging gracefully handles `RSCHAT_LOG_MODE=none` (or unset) without errors
- Template logging support added to:
- `basic_usage.py.j2`
- `advanced_usage.py.j2`
- `env_usage.py.j2`
- `env_advanced_usage.py.j2`

Changed
- `call_azure_openai_handler()` now returns the full OpenAI response object instead of just the content
- Token estimation moved to a reusable utility with smart tokenizer resolution
- Logging system respects user intent: no logging unless explicitly enabled via environment variables
- CLI output reorganized to be more readable and transparent
- Bumped version to 0.4.0

Removed
- Implicit logging behavior — users must now explicitly enable it
___

0.3.3

Added
- Rewritten `README.md` to improve structure, clarity, and professionalism
- Improved section linking and emoji compatibility for better UX
- Refactored `SECURITY.md` with clearer language and contributor guidelines

Changed
- Bumped version to 0.3.3
___

0.3.2

Fixed
- Removed accidental inclusion of `__pycache__` directory from the PyPI package

Changed
- Bumped version to 0.3.2
___

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.