Skip to content

Commit

Permalink
undo
Browse files Browse the repository at this point in the history
  • Loading branch information
isahers1 committed Dec 9, 2024
1 parent 04a5496 commit c8a2b01
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions python/langsmith/_internal/_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
(
Expand Down Expand Up @@ -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}",
Expand Down

0 comments on commit c8a2b01

Please sign in to comment.