You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python: Remove FileContent and enhance BinaryContent for .NET alignment
Remove FileContent class and adapt its functionality to BinaryContent by default,
aligning with .NET Microsoft.Extensions.AI design patterns.
BinaryContent now handles file operations through:
- can_read property to check data availability (matches .NET CanRead)
- from_file() class method to create instances from file paths
- to_openai_file_dict() method for OpenAI Responses API integration
- Standard to_dict() preserves existing binary format
- Generated UUID-based filenames for OpenAI file format (like .NET GUID approach)
OpenAI integration updated to use BinaryContent with can_read check for file handling.
ImageContent behavior preserved with no breaking changes.
0 commit comments