Lion Core v0.5.5 Release Notes
New Features
Data Analysis Capabilities
- Added `to_df()` method to Session class for converting messages to pandas DataFrame
- Added `to_df()` method to Pile class for direct DataFrame conversion
- Added standardized timestamp handling in DataFrame conversions
Message Field Standardization
- Added MessageField enum for consistent field access:
- TIMESTAMP, LION_CLASS, ROLE, CONTENT
- LN_ID, SENDER, RECIPIENT, METADATA
- Added formatted_dict property to RoledMessage for standardized serialization
Enhanced Typing System
- Added new ID type alias combining str | Observable
- Improved type hints throughout core classes
- Added FIELD_NAME type variable for component field operations
API Changes
Tool Manager
- `invoke()` now returns tuple[Any, Log] instead of Any
- Example:
python
Before
result = await tool_manager.invoke(func_call)
print(result) 3
After
result, log = await tool_manager.invoke(func_call)
print(result) 3
print(log) Log object with execution details
Component Field Management
- Stricter type checking in field operations
- Better error messages for field validation failures
- Enhanced field annotation support
Improvements
Logging System
- Added file operation logging
- Improved error handling in log persistence
- Enhanced log format consistency
Type Safety
- Stricter field type validation
- Better type inference in generic operations
- More descriptive type-related error messages
Dependencies
- Updated lionabc to version 1.2.1
- Added optional pandas dependency for DataFrame features
Bug Fixes
- Fixed message serialization edge cases
- Improved error handling in file operations
- Enhanced validation in field updates
Migration Notes
Breaking Changes
None, but behavioral changes to note:
1. Tool Manager's invoke() return type change:
python
Update any code that uses tool_manager.invoke():
result, _ = await tool_manager.invoke(func_call) Ignore log if not needed
2. Stricter field type validation may catch previously undetected issues
New Requirements
- pandas required for DataFrame conversion features (optional)
Documentation
- Updated type hints throughout codebase
- Added examples for new DataFrame features
- Enhanced API documentation for modified methods
What's Changed
* Modifying messages by ohdearquant in https://github.com/lion-agi/lion-core/pull/124
**Full Changelog**: https://github.com/lion-agi/lion-core/compare/v0.5.4...v0.5.5