●Change8

3.0.0b3

πŸ“¦ dspyView on GitHub β†’
✨ 9 featuresπŸ› 7 fixesπŸ”§ 10 symbols

Summary

Version 3.0.0b3 restores the `datasets` dependency, adds several new features such as `dspy.Code`, token streaming for XMLAdapter, and `dspy.syncify`, and includes numerous bug fixes and API refinements.

Migration Steps

  1. Install the `datasets` package if it is not already present.
  2. Update imports from `dspy.BaseType` to `dspy.Type`.
  3. Replace any direct use of `dict` on model objects with `model_dump` where custom handling is required.
  4. Use `dspy.syncify` for async dspy programs instead of manual event‑loop management.

✨ New Features

  • Added `dspy.Code` class.
  • Provided language support to `dspy.Code`.
  • Updated type hints to use the `collections` module.
  • Added tests for PEP604 union types.
  • Switched model serialization to use `model_dump` instead of `dict`.
  • Added token streaming support to `XMLAdapter`.
  • Introduced `dspy.syncify` utility for running optimizers on async dspy programs.
  • Added Windows user confirmation support for MIPROv2.
  • Enabled unit tests to run with real LLM calls.

πŸ› Bug Fixes

  • Restored `datasets` as a default dependency to prevent silent bootstrapping failures of MIPROv2.
  • Fixed type annotation for `ensure_signature`.
  • Fixed native function calling in adapters.
  • Correctly unwrapped Pyodide objects.
  • Fixed UnicodeDecodeError related to the 'gbk' codec.
  • Updated `python_interpreter.py` module to resolve interpreter issues.
  • Resolved "$def" handling for nested tool argument types.

πŸ”§ Affected Symbols

dspy.Codedspy.Typedspy.BaseTypeensure_signatureXMLAdapterdspy.syncifypython_interpreterpyodide object handling$def handlingMIPROv2