From c8a2b01e0625312884233c879316d1a3a4037b9a Mon Sep 17 00:00:00 2001 From: isaac hershenson Date: Mon, 9 Dec 2024 14:48:48 -0800 Subject: [PATCH] undo --- python/langsmith/_internal/_operations.py | 24 +++++++++-------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/python/langsmith/_internal/_operations.py b/python/langsmith/_internal/_operations.py index 3f82f5f9a..cc615d60d 100644 --- a/python/langsmith/_internal/_operations.py +++ b/python/langsmith/_internal/_operations.py @@ -214,7 +214,6 @@ def serialized_run_operation_to_multipart_parts_and_context( op: SerializedRunOperation, ) -> MultipartPartsAndContext: acc_parts: list[MultipartPart] = [] - valb: Union[bytes, Path] # this is main object, minus inputs/outputs/events/attachments acc_parts.append( ( @@ -257,22 +256,17 @@ def serialized_run_operation_to_multipart_parts_and_context( ) continue - if isinstance(valb, Path): - # TODO: actually deal with this case - # This is just for speed of getting something out - continue - else: - acc_parts.append( + acc_parts.append( + ( + f"attachment.{op.id}.{n}", ( - f"attachment.{op.id}.{n}", - ( - None, - valb, - content_type, - {"Content-Length": str(len(valb))}, - ), - ) + None, + valb, + content_type, + {"Content-Length": str(len(valb))}, + ), ) + ) return MultipartPartsAndContext( acc_parts, f"trace={op.trace_id},id={op.id}",