Releases: MaximeRivest/functai
v0.12.0
Full Changelog: v0.11.0...v0.12.0
v0.11.0
FunctAI v0.11.0
This release focuses on instruction quality and developer ergonomics: auto-instruction, optional refinement from observed calls, teacher-driven example synthesis, and better optimization workflows. It also adds a small history helper and updates docs/examples.
Highlights
- Auto-instruction: Generate an initial system instruction from your function code and types at creation (controlled by
autocompile/autoinstruct; enabled by default). - Instruction refinement: Improve the instruction over the first N calls using recent inputs/outputs as noisy hints (not ground truth). Configure via
instruction_autorefine_callsandinstruction_autorefine_max_examples. Disable anytime with.freeze(). - Teacher modes: Use
teacherand/orteacher_lmwith@ai(...)and.opt(...)to synthesize examples (n_synth) for optimization. Supports teacher programs (FunctAIFunc) or bare LMs. - Example ingestion:
.opt(...)accepts DSPyExamples, JSON-like dicts, or(inputs, outputs)pairs; auto-coerces into a trainset. - Default metric: When an optimizer requires
metricand none is provided, fall back to an exact-match metric over all output fields. - Optimization logs:
.opt(...)runs are recorded (time, optimizer, metric, example counts, synthesized flag). Inspect viaoptimization_runs(). - Bespoke instruction override: If you set a custom instruction at runtime, it’s used in the signature and docstring appendix is skipped.
- History helper: New
phistory(n=1)printsdspy.inspect_history()to quickly inspect recent calls. - Docs and examples: README/specs updated to use
phistory; addedexamples/typing_and_extractiondemonstrating type-directed extraction.
Upgrade notes
- No breaking changes expected. If you previously referenced
inspect_history_text, prefer the newphistory()helper.
Thanks for using FunctAI! Feedback and issues welcome.
Release v0.10.0
• Type-directed outputs: preserve function return annotations and variable annotations (including typing generics like list[int], dict[str, int]), and pass them intact to DSPy.
• Clear precedence: when returning a variable from _ai, prefer that variable's annotation; otherwise inherit the function's return annotation; mismatch raises a helpful error with actionable fixes.
• Sentinel returns: return _ai / return ... uses the function's return annotation for the primary result output; auxiliary _ai variables become extra outputs.
• Extras typing: unannotated extra outputs default to str; annotated ones are preserved.
• Instruction text: keep output and field docs but avoid naming base types in instructions; only include class/dataclass field docs when meaningful.
• Schema friendliness: auto-convert plain classes-with-annotations to dataclasses and ensure nested types are schema-friendly.
Release v0.6.0
Release v0.6.0
Minor version bump to ensure GitHub Actions workflow triggers properly for PyPI publishing.
Changes since v0.5.0
- Version bump to test automated PyPI deployment
Full Changelog: v0.5.0...v0.6.0
Release v0.5.0
What's Changed
🚀 Major Improvements
- Refactored core implementation for better maintainability
- Updated documentation and examples
- Improved type handling and error messages
- Enhanced API consistency
📚 Documentation
- Comprehensive README with examples
- Updated specs documentation
This is a significant release with improved stability and usability.
Full Changelog: v0.1.2...v0.5.0