prompty 0.1.20__py2.py3-none-any.whl → 0.1.22__py2.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.
prompty/tracer.py CHANGED
@@ -112,7 +112,7 @@ def _results(result: Any) -> dict:
112
112
 
113
113
 
114
114
  def _trace_sync(
115
- func: Callable = None, *, description: str = None, type: str = None
115
+ func: Callable = None, *, description: str = None, itemtype: str = None
116
116
  ) -> Callable:
117
117
  description = description or ""
118
118
 
@@ -124,8 +124,8 @@ def _trace_sync(
124
124
  if description and description != "":
125
125
  trace("description", description)
126
126
 
127
- if type and type != "":
128
- trace("type", type)
127
+ if itemtype and itemtype != "":
128
+ trace("type", itemtype)
129
129
 
130
130
  inputs = _inputs(func, args, kwargs)
131
131
  trace("inputs", inputs)
@@ -138,7 +138,8 @@ def _trace_sync(
138
138
  "result",
139
139
  {
140
140
  "exception": {
141
- "type": type(e).__name__,
141
+ "type": type(e),
142
+ "traceback": traceback.format_tb(),
142
143
  "message": str(e),
143
144
  "args": to_dict(e.args),
144
145
  }
@@ -152,7 +153,7 @@ def _trace_sync(
152
153
 
153
154
 
154
155
  def _trace_async(
155
- func: Callable = None, *, description: str = None, type: str = None
156
+ func: Callable = None, *, description: str = None, itemtype: str = None
156
157
  ) -> Callable:
157
158
  description = description or ""
158
159
 
@@ -164,8 +165,8 @@ def _trace_async(
164
165
  if description and description != "":
165
166
  trace("description", description)
166
167
 
167
- if type and type != "":
168
- trace("type", type)
168
+ if itemtype and itemtype != "":
169
+ trace("type", itemtype)
169
170
 
170
171
  inputs = _inputs(func, args, kwargs)
171
172
  trace("inputs", inputs)
@@ -192,14 +193,14 @@ def _trace_async(
192
193
 
193
194
 
194
195
  def trace(
195
- func: Callable = None, *, description: str = None, type: str = None
196
+ func: Callable = None, *, description: str = None, itemtype: str = None
196
197
  ) -> Callable:
197
198
  if func is None:
198
- return partial(trace, description=description, type=type)
199
+ return partial(trace, description=description, itemtype=itemtype)
199
200
 
200
201
  wrapped_method = _trace_async if inspect.iscoroutinefunction(func) else _trace_sync
201
202
 
202
- return wrapped_method(func, description=description, type=type)
203
+ return wrapped_method(func, description=description, itemtype=itemtype)
203
204
 
204
205
 
205
206
  class PromptyTracer:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prompty
3
- Version: 0.1.20
3
+ Version: 0.1.22
4
4
  Summary: Prompty is a new asset class and format for LLM prompts that aims to provide observability, understandability, and portability for developers. It includes spec, tooling, and a runtime. This Prompty runtime supports Python
5
5
  Author-Email: Seth Juarez <seth.juarez@microsoft.com>
6
6
  Requires-Dist: pyyaml>=6.0.1
@@ -1,7 +1,7 @@
1
- prompty-0.1.20.dist-info/METADATA,sha256=zZL7kvH2TAuXCRThW1v53zq2pgaReO-7IGvwSLgCPSk,9037
2
- prompty-0.1.20.dist-info/WHEEL,sha256=CuZGaXTwoRLAOVv0AcE3bCTxO5ejVuBEJkUBe9C-kvk,94
3
- prompty-0.1.20.dist-info/entry_points.txt,sha256=9y1lKPWUpPWRJzUslcVH-gMwbNoa2PzjyoZsKYLQqyw,45
4
- prompty-0.1.20.dist-info/licenses/LICENSE,sha256=KWSC4z9cfML_t0xThoQYjzTdcZQj86Y_mhXdatzU-KM,1052
1
+ prompty-0.1.22.dist-info/METADATA,sha256=Eod5GjF7vmHxCeBiiorNc1hdmfJISKNQAXnKEhG21Yw,9037
2
+ prompty-0.1.22.dist-info/WHEEL,sha256=CuZGaXTwoRLAOVv0AcE3bCTxO5ejVuBEJkUBe9C-kvk,94
3
+ prompty-0.1.22.dist-info/entry_points.txt,sha256=9y1lKPWUpPWRJzUslcVH-gMwbNoa2PzjyoZsKYLQqyw,45
4
+ prompty-0.1.22.dist-info/licenses/LICENSE,sha256=KWSC4z9cfML_t0xThoQYjzTdcZQj86Y_mhXdatzU-KM,1052
5
5
  prompty/__init__.py,sha256=XTUgJ3xT7HYJieuWW5PBItey0BWneg3G7iBBjIeNJZU,11628
6
6
  prompty/azure/__init__.py,sha256=ptGajCh68s_tugPv45Y4GJCyBToNFCExUzUh9yIBIfo,292
7
7
  prompty/azure/executor.py,sha256=4BiVgDcoDaJ2QcSd3O1LIm_3Fh-ln6wjqO2ZoVYjslc,4700
@@ -16,5 +16,5 @@ prompty/renderers.py,sha256=RSHFQFx7AtKLUfsMLCXR0a56Mb7DL1NJNgjUqgg3IqU,776
16
16
  prompty/serverless/__init__.py,sha256=NPqoFATEMQ96G8OQkVcGxUWU4llIQCwxfJePPo8YFY8,279
17
17
  prompty/serverless/executor.py,sha256=jbTnYE2aq8oS5PWcZ96NhhjL-gU1a_tlUoB449QqHaY,4648
18
18
  prompty/serverless/processor.py,sha256=pft1XGbPzo0MzQMbAt1VxsLsvRrjQO3B8MXEE2PfSA0,1982
19
- prompty/tracer.py,sha256=RDI7Ull1HDAnNhOBg0ZjRVeeuu_pl1Z-knXvgY0yGvo,10508
20
- prompty-0.1.20.dist-info/RECORD,,
19
+ prompty/tracer.py,sha256=E2nOywos-KFlfHxArqLBuypPq2WKxaK5tn6XujOX2t8,10615
20
+ prompty-0.1.22.dist-info/RECORD,,