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
- Install the `datasets` package if it is not already present.
- Update imports from `dspy.BaseType` to `dspy.Type`.
- Replace any direct use of `dict` on model objects with `model_dump` where custom handling is required.
- 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