prompty 0.1.20__tar.gz → 0.1.22__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {prompty-0.1.20 → prompty-0.1.22}/PKG-INFO +1 -1
- {prompty-0.1.20 → prompty-0.1.22}/prompty/tracer.py +11 -10
- {prompty-0.1.20 → prompty-0.1.22}/pyproject.toml +1 -1
- {prompty-0.1.20 → prompty-0.1.22}/LICENSE +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/README.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/__init__.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/azure/__init__.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/azure/executor.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/azure/processor.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/cli.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/core.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/openai/__init__.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/openai/executor.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/openai/processor.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/parsers.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/renderers.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/serverless/__init__.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/serverless/executor.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/prompty/serverless/processor.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/fake_azure_executor.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/fake_serverless_executor.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/1contoso.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/2contoso.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/3contoso.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/4contoso.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/basic.prompty.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/camping.jpg +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/context.prompty.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/contoso_multi.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/faithfulness.prompty.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/generated/groundedness.prompty.md +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/hello_world-goodbye_world-hello_again.embedding.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/hello_world.embedding.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/__init__.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/basic.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/basic.prompty.execution.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/basic_json_output.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/camping.jpg +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/chat.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/context.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/context.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/context.prompty.execution.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/embedding.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/embedding.prompty.execution.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/evaluation.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/faithfulness.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/faithfulness.prompty.execution.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/fake.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/funcfile.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/funcfile.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/functions.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/functions.prompty.execution.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/groundedness.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/groundedness.prompty.execution.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/prompty.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/serverless.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/serverless.prompty.execution.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/serverless_stream.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/serverless_stream.prompty.execution.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/streaming.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/streaming.prompty.execution.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/sub/__init__.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/sub/basic.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/sub/sub/__init__.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/sub/sub/basic.prompty +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/sub/sub/prompty.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/sub/sub/test.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompts/test.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/prompty.json +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/test_common.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/test_execute.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/test_factory_invoker.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/test_path_exec.py +0 -0
- {prompty-0.1.20 → prompty-0.1.22}/tests/test_tracing.py +0 -0
@@ -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
|
@@ -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)
|
@@ -138,7 +138,8 @@ def _trace_sync(
|
|
138
138
|
"result",
|
139
139
|
{
|
140
140
|
"exception": {
|
141
|
-
"type": type(e)
|
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,
|
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
|
168
|
-
trace("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,
|
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,
|
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,
|
203
|
+
return wrapped_method(func, description=description, itemtype=itemtype)
|
203
204
|
|
204
205
|
|
205
206
|
class PromptyTracer:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{prompty-0.1.20 → prompty-0.1.22}/tests/hello_world-goodbye_world-hello_again.embedding.json
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|