lmnr 0.2.3__py3-none-any.whl → 0.2.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  from typing import Callable, Optional
2
2
  from websockets.sync.client import connect
3
- from lmnr.types import NodeInput, RegisterDebuggerRequest, SDKError, ToolCall
3
+ from lmnr.types import DeregisterDebuggerRequest, NodeInput, RegisterDebuggerRequest, SDKError, ToolCall
4
4
  import uuid
5
5
  import json
6
6
  from threading import Thread
@@ -32,7 +32,7 @@ class RemoteDebugger:
32
32
  return self.session
33
33
 
34
34
  def _run(self):
35
- request = RegisterDebuggerRequest(debugger_session_id=self.session)
35
+ request = RegisterDebuggerRequest(debuggerSessionId=self.session)
36
36
  with connect(
37
37
  self.url,
38
38
  additional_headers={
@@ -71,6 +71,7 @@ class RemoteDebugger:
71
71
  pass
72
72
  response = tool(**arguments)
73
73
  websocket.send(json.dumps(response))
74
+ websocket.send(DeregisterDebuggerRequest(debuggerSessionId=self.session, deregister=True).model_dump_json())
74
75
 
75
76
  def _generate_session_id(self) -> str:
76
77
  return uuid.uuid4().urn[9:]
@@ -80,7 +81,7 @@ class RemoteDebugger:
80
81
  f"""
81
82
  ========================================
82
83
  Debugger Session ID:
83
- {self.session_id}
84
+ {self.session}
84
85
  ========================================
85
86
  """
86
87
 
lmnr/types.py CHANGED
@@ -51,5 +51,10 @@ class ToolCall(pydantic.BaseModel):
51
51
  type: Optional[str]
52
52
  function: ToolCallRequest
53
53
 
54
+ # TODO: allow snake_case and manually convert to camelCase
54
55
  class RegisterDebuggerRequest(pydantic.BaseModel):
55
- debugger_session_id: str
56
+ debuggerSessionId: str
57
+
58
+ class DeregisterDebuggerRequest(pydantic.BaseModel):
59
+ debuggerSessionId: str
60
+ deregister: bool
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lmnr
3
- Version: 0.2.3
3
+ Version: 0.2.3.1
4
4
  Summary: Python SDK for Laminar AI
5
5
  License: Apache-2.0
6
6
  Author: lmnr.ai
@@ -19,10 +19,10 @@ lmnr/cli/{{cookiecutter.lmnr_pipelines_dir_name}}/pipelines/{{cookiecutter.pipel
19
19
  lmnr/cli/{{cookiecutter.lmnr_pipelines_dir_name}}/pipelines/{{cookiecutter.pipeline_dir_name}}/{{cookiecutter.pipeline_dir_name}}.py,sha256=WG-ZMofPpGXCx5jdWVry3_XBzcKjqn8ZycFSiWEOBPg,2858
20
20
  lmnr/cli/{{cookiecutter.lmnr_pipelines_dir_name}}/types.py,sha256=iWuflMV7TiaBPs6-B-BlrovvWpZgHGGHK0v8rSqER7A,997
21
21
  lmnr/sdk/endpoint.py,sha256=tT6-w-mwbh4BAwnj5G0pCVE_Sz8EUzZmpBtacm_T2pE,6359
22
- lmnr/sdk/remote_debugger.py,sha256=eXbfnl0RoBcGCViajIFsY5W28HQIf791HTffbWBNJY4,3156
23
- lmnr/types.py,sha256=f_46qjFK_jJziNFEzN-ip8bgPHxkohib2xGesNOdyxs,1526
24
- lmnr-0.2.3.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
25
- lmnr-0.2.3.dist-info/METADATA,sha256=GdJL6YTZ3VnbuQvkz9kPN5QYrC4wBFdkpwq_Er79P28,2258
26
- lmnr-0.2.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
27
- lmnr-0.2.3.dist-info/entry_points.txt,sha256=Qg7ZRax4k-rcQsZ26XRYQ8YFSBiyY2PNxYfq4a6PYXI,41
28
- lmnr-0.2.3.dist-info/RECORD,,
22
+ lmnr/sdk/remote_debugger.py,sha256=lAL7t0DXADLMTLsh6AN3rqVYf_A-aeG_mMbyU-G2wTk,3299
23
+ lmnr/types.py,sha256=Pi6R5qMmN4fiwZR0TzP4rxfSP6rFv4iouZ_OKnJsmhA,1685
24
+ lmnr-0.2.3.1.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
25
+ lmnr-0.2.3.1.dist-info/METADATA,sha256=pOu2E4OUgWKruxNR6b5DyeLHJWlZji9EapcC0JqEQNE,2260
26
+ lmnr-0.2.3.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
27
+ lmnr-0.2.3.1.dist-info/entry_points.txt,sha256=Qg7ZRax4k-rcQsZ26XRYQ8YFSBiyY2PNxYfq4a6PYXI,41
28
+ lmnr-0.2.3.1.dist-info/RECORD,,
File without changes
File without changes