From 6928d90d807e79747bcac1e08db4fe1f204dd6a5 Mon Sep 17 00:00:00 2001 From: Angus Jelinek Date: Mon, 30 Dec 2024 21:39:05 -0500 Subject: [PATCH] fix: Reset buffer after sending to server --- python/langsmith/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/langsmith/client.py b/python/langsmith/client.py index 143186e73..f7eb11043 100644 --- a/python/langsmith/client.py +++ b/python/langsmith/client.py @@ -1821,6 +1821,8 @@ def _send_compressed_multipart_req(self, data_stream, *, attempts: int = 3): _context: str = "" for api_url, api_key in self._write_api_urls.items(): + data_stream.seek(0) + for idx in range(1, attempts + 1): try: headers = {