Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
fix: convert float timeout to int before string conversion (#1076)
Rayan Pala8e5201c17b4
diff --git a/.changeset/fix-timeout-float-conversion.md b/.changeset/fix-timeout-float-conversion.mdnew file mode 100644index 000000000..b773bda77--- /dev/null+++ b/.changeset/fix-timeout-float-conversion.md@@ -0,0 +1,5 @@+---+'e2b': patch+---++fix float timeout to int conversion for Go backend compatibilitydiff --git a/packages/python-sdk/e2b_connect/client.py b/packages/python-sdk/e2b_connect/client.pyindex 55587fa64..61ebb6fb9 100644--- a/packages/python-sdk/e2b_connect/client.py+++ b/packages/python-sdk/e2b_connect/client.py@@ -305,9 +305,9 @@ class Client:res = self.pool.request(**req_data)return self._process_unary_response(res)- def _create_stream_timeout(self, timeout: Optional[int]):+ def _create_stream_timeout(self, timeout: Optional[float]):if timeout:- return {"connect-timeout-ms": str(timeout * 1000)}+ return {"connect-timeout-ms": str(int(timeout * 1000))}return {}def _prepare_server_stream_request(