Skip to content

Releases: MaximeRivest/functai

v0.12.0

05 Sep 02:24

Choose a tag to compare

v0.11.0

03 Sep 12:39

Choose a tag to compare

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_calls and instruction_autorefine_max_examples. Disable anytime with .freeze().
  • Teacher modes: Use teacher and/or teacher_lm with @ai(...) and .opt(...) to synthesize examples (n_synth) for optimization. Supports teacher programs (FunctAIFunc) or bare LMs.
  • Example ingestion: .opt(...) accepts DSPy Examples, JSON-like dicts, or (inputs, outputs) pairs; auto-coerces into a trainset.
  • Default metric: When an optimizer requires metric and 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 via optimization_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) prints dspy.inspect_history() to quickly inspect recent calls.
  • Docs and examples: README/specs updated to use phistory; added examples/typing_and_extraction demonstrating type-directed extraction.

Upgrade notes

  • No breaking changes expected. If you previously referenced inspect_history_text, prefer the new phistory() helper.

Thanks for using FunctAI! Feedback and issues welcome.

Release v0.10.0

02 Sep 23:53

Choose a tag to compare

• 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

30 Aug 17:58

Choose a tag to compare

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

30 Aug 17:54

Choose a tag to compare

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