Skip to content

Commit bc8e221

Browse files
committed
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.
1 parent 19557eb commit bc8e221

File tree

4 files changed

+253
-57
lines changed

4 files changed

+253
-57
lines changed

0 commit comments

Comments
 (0)