prompty 0.1.21__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 +9 -9
 - {prompty-0.1.21.dist-info → prompty-0.1.22.dist-info}/METADATA +1 -1
 - {prompty-0.1.21.dist-info → prompty-0.1.22.dist-info}/RECORD +6 -6
 - {prompty-0.1.21.dist-info → prompty-0.1.22.dist-info}/WHEEL +0 -0
 - {prompty-0.1.21.dist-info → prompty-0.1.22.dist-info}/entry_points.txt +0 -0
 - {prompty-0.1.21.dist-info → prompty-0.1.22.dist-info}/licenses/LICENSE +0 -0
 
    
        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,  
     | 
| 
      
 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  
     | 
| 
       128 
     | 
    
         
            -
                            trace("type",  
     | 
| 
      
 127 
     | 
    
         
            +
                        if itemtype and itemtype != "":
         
     | 
| 
      
 128 
     | 
    
         
            +
                            trace("type", itemtype)
         
     | 
| 
       129 
129 
     | 
    
         | 
| 
       130 
130 
     | 
    
         
             
                        inputs = _inputs(func, args, kwargs)
         
     | 
| 
       131 
131 
     | 
    
         
             
                        trace("inputs", inputs)
         
     | 
| 
         @@ -153,7 +153,7 @@ def _trace_sync( 
     | 
|
| 
       153 
153 
     | 
    
         | 
| 
       154 
154 
     | 
    
         | 
| 
       155 
155 
     | 
    
         
             
            def _trace_async(
         
     | 
| 
       156 
     | 
    
         
            -
                func: Callable = None, *, description: str = None,  
     | 
| 
      
 156 
     | 
    
         
            +
                func: Callable = None, *, description: str = None, itemtype: str = None
         
     | 
| 
       157 
157 
     | 
    
         
             
            ) -> Callable:
         
     | 
| 
       158 
158 
     | 
    
         
             
                description = description or ""
         
     | 
| 
       159 
159 
     | 
    
         | 
| 
         @@ -165,8 +165,8 @@ def _trace_async( 
     | 
|
| 
       165 
165 
     | 
    
         
             
                        if description and description != "":
         
     | 
| 
       166 
166 
     | 
    
         
             
                            trace("description", description)
         
     | 
| 
       167 
167 
     | 
    
         | 
| 
       168 
     | 
    
         
            -
                        if  
     | 
| 
       169 
     | 
    
         
            -
                            trace("type",  
     | 
| 
      
 168 
     | 
    
         
            +
                        if itemtype and itemtype != "":
         
     | 
| 
      
 169 
     | 
    
         
            +
                            trace("type", itemtype)
         
     | 
| 
       170 
170 
     | 
    
         | 
| 
       171 
171 
     | 
    
         
             
                        inputs = _inputs(func, args, kwargs)
         
     | 
| 
       172 
172 
     | 
    
         
             
                        trace("inputs", inputs)
         
     | 
| 
         @@ -193,14 +193,14 @@ def _trace_async( 
     | 
|
| 
       193 
193 
     | 
    
         | 
| 
       194 
194 
     | 
    
         | 
| 
       195 
195 
     | 
    
         
             
            def trace(
         
     | 
| 
       196 
     | 
    
         
            -
                func: Callable = None, *, description: str = None,  
     | 
| 
      
 196 
     | 
    
         
            +
                func: Callable = None, *, description: str = None, itemtype: str = None
         
     | 
| 
       197 
197 
     | 
    
         
             
            ) -> Callable:
         
     | 
| 
       198 
198 
     | 
    
         
             
                if func is None:
         
     | 
| 
       199 
     | 
    
         
            -
                    return partial(trace, description=description,  
     | 
| 
      
 199 
     | 
    
         
            +
                    return partial(trace, description=description, itemtype=itemtype)
         
     | 
| 
       200 
200 
     | 
    
         | 
| 
       201 
201 
     | 
    
         
             
                wrapped_method = _trace_async if inspect.iscoroutinefunction(func) else _trace_sync
         
     | 
| 
       202 
202 
     | 
    
         | 
| 
       203 
     | 
    
         
            -
                return wrapped_method(func, description=description,  
     | 
| 
      
 203 
     | 
    
         
            +
                return wrapped_method(func, description=description, itemtype=itemtype)
         
     | 
| 
       204 
204 
     | 
    
         | 
| 
       205 
205 
     | 
    
         | 
| 
       206 
206 
     | 
    
         
             
            class PromptyTracer:
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Metadata-Version: 2.1
         
     | 
| 
       2 
2 
     | 
    
         
             
            Name: prompty
         
     | 
| 
       3 
     | 
    
         
            -
            Version: 0.1. 
     | 
| 
      
 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. 
     | 
| 
       2 
     | 
    
         
            -
            prompty-0.1. 
     | 
| 
       3 
     | 
    
         
            -
            prompty-0.1. 
     | 
| 
       4 
     | 
    
         
            -
            prompty-0.1. 
     | 
| 
      
 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= 
     | 
| 
       20 
     | 
    
         
            -
            prompty-0.1. 
     | 
| 
      
 19 
     | 
    
         
            +
            prompty/tracer.py,sha256=E2nOywos-KFlfHxArqLBuypPq2WKxaK5tn6XujOX2t8,10615
         
     | 
| 
      
 20 
     | 
    
         
            +
            prompty-0.1.22.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |