promptlayer 1.0.18__py3-none-any.whl → 1.0.19__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.
Potentially problematic release.
This version of promptlayer might be problematic. Click here for more details.
- promptlayer/__init__.py +1 -1
- promptlayer/promptlayer.py +5 -3
- {promptlayer-1.0.18.dist-info → promptlayer-1.0.19.dist-info}/METADATA +1 -1
- {promptlayer-1.0.18.dist-info → promptlayer-1.0.19.dist-info}/RECORD +6 -6
- {promptlayer-1.0.18.dist-info → promptlayer-1.0.19.dist-info}/LICENSE +0 -0
- {promptlayer-1.0.18.dist-info → promptlayer-1.0.19.dist-info}/WHEEL +0 -0
promptlayer/__init__.py
CHANGED
promptlayer/promptlayer.py
CHANGED
|
@@ -356,12 +356,13 @@ class PromptLayer:
|
|
|
356
356
|
else:
|
|
357
357
|
return self._run_internal(**_run_internal_kwargs)
|
|
358
358
|
|
|
359
|
-
def traceable(self, attributes=None):
|
|
359
|
+
def traceable(self, attributes=None, name=None):
|
|
360
360
|
def decorator(func):
|
|
361
361
|
@wraps(func)
|
|
362
362
|
def sync_wrapper(*args, **kwargs):
|
|
363
363
|
if self.tracer:
|
|
364
|
-
|
|
364
|
+
span_name = name or func.__name__
|
|
365
|
+
with self.tracer.start_as_current_span(span_name) as span:
|
|
365
366
|
if attributes:
|
|
366
367
|
for key, value in attributes.items():
|
|
367
368
|
span.set_attribute(key, value)
|
|
@@ -379,7 +380,8 @@ class PromptLayer:
|
|
|
379
380
|
@wraps(func)
|
|
380
381
|
async def async_wrapper(*args, **kwargs):
|
|
381
382
|
if self.tracer:
|
|
382
|
-
|
|
383
|
+
span_name = name or func.__name__
|
|
384
|
+
with self.tracer.start_as_current_span(span_name) as span:
|
|
383
385
|
if attributes:
|
|
384
386
|
for key, value in attributes.items():
|
|
385
387
|
span.set_attribute(key, value)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
promptlayer/__init__.py,sha256=
|
|
1
|
+
promptlayer/__init__.py,sha256=FGUGavxgGe91xAsLApjZDljIp5Rr0rgCFAWbe9NkT-E,102
|
|
2
2
|
promptlayer/groups/__init__.py,sha256=-xs-2cn0nc0D_5YxZr3nC86iTdRVZmBhEpOKDJXE-sQ,224
|
|
3
3
|
promptlayer/groups/groups.py,sha256=yeO6T0TM3qB0ondZRiHhcH8G06YygrpFoM8b9RmoIao,165
|
|
4
|
-
promptlayer/promptlayer.py,sha256
|
|
4
|
+
promptlayer/promptlayer.py,sha256=-Gym7TOsdYELXb81CWZ9cpDEfDb1ga-ZJL24HKmXQow,13989
|
|
5
5
|
promptlayer/promptlayer_base.py,sha256=sev-EZehRXJSZSmJtMkqmAUK1345pqbDY_lNjPP5MYA,7158
|
|
6
6
|
promptlayer/span_exporter.py,sha256=zIJNsb3Fe6yb5wKLDmkoPF2wqFjk1p39E0jWHD2plzI,2658
|
|
7
7
|
promptlayer/templates.py,sha256=aY_-BCrL0AgIdYEUE28pi0AP_avTVAgwv5hgzrh75vo,717
|
|
@@ -10,7 +10,7 @@ promptlayer/track/track.py,sha256=XNEZT9yNiRBPp9vaDZo_f0dP_ldOu8q1qafpVfS5Ze8,16
|
|
|
10
10
|
promptlayer/types/__init__.py,sha256=ulWSyCrk5hZ_PI-nKGpd6GPcRaK8lqP4wFl0LPNUYWk,61
|
|
11
11
|
promptlayer/types/prompt_template.py,sha256=QbxYSeIubrwp8KmDKdt9syAwzONFPh_So9yr4H73ANQ,4429
|
|
12
12
|
promptlayer/utils.py,sha256=-p0qapUvkZYJd_Dfat3c8LANXWU1JN0bJB91IyjB8iA,29656
|
|
13
|
-
promptlayer-1.0.
|
|
14
|
-
promptlayer-1.0.
|
|
15
|
-
promptlayer-1.0.
|
|
16
|
-
promptlayer-1.0.
|
|
13
|
+
promptlayer-1.0.19.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
14
|
+
promptlayer-1.0.19.dist-info/METADATA,sha256=E3Eap9BWe5UF1jDnH2nZkRR-KDTYH9zNMkV7uOf7OFg,4609
|
|
15
|
+
promptlayer-1.0.19.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
16
|
+
promptlayer-1.0.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|