prompty 0.1.37__py3-none-any.whl → 0.1.38__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 +21 -1
- {prompty-0.1.37.dist-info → prompty-0.1.38.dist-info}/METADATA +1 -1
- {prompty-0.1.37.dist-info → prompty-0.1.38.dist-info}/RECORD +6 -6
- {prompty-0.1.37.dist-info → prompty-0.1.38.dist-info}/WHEEL +0 -0
- {prompty-0.1.37.dist-info → prompty-0.1.38.dist-info}/entry_points.txt +0 -0
- {prompty-0.1.37.dist-info → prompty-0.1.38.dist-info}/licenses/LICENSE +0 -0
prompty/tracer.py
CHANGED
@@ -134,7 +134,17 @@ def _trace_sync(
|
|
134
134
|
@wraps(func)
|
135
135
|
def wrapper(*args, **kwargs):
|
136
136
|
name, signature = _name(func, args)
|
137
|
+
altname: str = None
|
138
|
+
# special case
|
139
|
+
if "name" in okwargs:
|
140
|
+
altname = name
|
141
|
+
name = okwargs["name"]
|
142
|
+
del okwargs["name"]
|
143
|
+
|
137
144
|
with Tracer.start(name) as trace:
|
145
|
+
if altname != None:
|
146
|
+
trace("function", altname)
|
147
|
+
|
138
148
|
trace("signature", signature)
|
139
149
|
|
140
150
|
# support arbitrary keyword
|
@@ -178,10 +188,20 @@ def _trace_async(
|
|
178
188
|
@wraps(func)
|
179
189
|
async def wrapper(*args, **kwargs):
|
180
190
|
name, signature = _name(func, args)
|
191
|
+
altname: str = None
|
192
|
+
# special case
|
193
|
+
if "name" in okwargs:
|
194
|
+
altname = name
|
195
|
+
name = okwargs["name"]
|
196
|
+
del okwargs["name"]
|
197
|
+
|
181
198
|
with Tracer.start(name) as trace:
|
199
|
+
if altname != None:
|
200
|
+
trace("function", altname)
|
201
|
+
|
182
202
|
trace("signature", signature)
|
183
203
|
|
184
|
-
# support arbitrary keyword
|
204
|
+
# support arbitrary keyword
|
185
205
|
# arguments for trace decorator
|
186
206
|
for k, v in okwargs.items():
|
187
207
|
trace(k, to_dict(v))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: prompty
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.38
|
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
|
License: MIT
|
@@ -1,7 +1,7 @@
|
|
1
|
-
prompty-0.1.
|
2
|
-
prompty-0.1.
|
3
|
-
prompty-0.1.
|
4
|
-
prompty-0.1.
|
1
|
+
prompty-0.1.38.dist-info/METADATA,sha256=m7yAPiF7NsDcD6RQMfdkSbBM-w9uphfEQY_4mwUaJ1w,9164
|
2
|
+
prompty-0.1.38.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
prompty-0.1.38.dist-info/entry_points.txt,sha256=a3i7Kvf--3DOkkv9VQpstwaNKgsnXwDGaPL18lPpKeI,60
|
4
|
+
prompty-0.1.38.dist-info/licenses/LICENSE,sha256=KWSC4z9cfML_t0xThoQYjzTdcZQj86Y_mhXdatzU-KM,1052
|
5
5
|
prompty/__init__.py,sha256=HCAvInBgNcIDO54rR4-RDIF4KUmGVQ2TRam_dS7xHEk,16561
|
6
6
|
prompty/azure/__init__.py,sha256=WI8qeNWfxqggj21bznL-mxGUS-v67bUrunX0Lf2hsI8,295
|
7
7
|
prompty/azure/executor.py,sha256=RJXMB0W7KcVvQ7l3xJaau7YM8PqOCQwuN4IwIe0sTLg,7930
|
@@ -19,6 +19,6 @@ prompty/renderers.py,sha256=80HNtCp3osgaLfhKxkG4j1kiRhJ727ITzT_yL5JLjEQ,1104
|
|
19
19
|
prompty/serverless/__init__.py,sha256=xoXOTRXO8C631swNKaa-ek5_R3X-87bJpTm0z_Rsg6A,282
|
20
20
|
prompty/serverless/executor.py,sha256=PUDJsYcJLQx9JSTh-R3HdJd0ehEC6w2Ch5OEqz52uVI,8395
|
21
21
|
prompty/serverless/processor.py,sha256=ZSL9y8JC-G4qbtWOSbQAqEcFMWEaLskyOr5VjLthelU,3660
|
22
|
-
prompty/tracer.py,sha256=
|
22
|
+
prompty/tracer.py,sha256=GdCvqJLiW6PEyW2lnElSD45y4IBmgw5gtNczImbg-44,11700
|
23
23
|
prompty/utils.py,sha256=jm7HEzOGk3zz8d5aquXK3zWIQWuDpBpJTzlz5sswtdg,2836
|
24
|
-
prompty-0.1.
|
24
|
+
prompty-0.1.38.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|