prompty 0.1.21__tar.gz → 0.1.22__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. {prompty-0.1.21 → prompty-0.1.22}/PKG-INFO +1 -1
  2. {prompty-0.1.21 → prompty-0.1.22}/prompty/tracer.py +9 -9
  3. {prompty-0.1.21 → prompty-0.1.22}/pyproject.toml +1 -1
  4. {prompty-0.1.21 → prompty-0.1.22}/LICENSE +0 -0
  5. {prompty-0.1.21 → prompty-0.1.22}/README.md +0 -0
  6. {prompty-0.1.21 → prompty-0.1.22}/prompty/__init__.py +0 -0
  7. {prompty-0.1.21 → prompty-0.1.22}/prompty/azure/__init__.py +0 -0
  8. {prompty-0.1.21 → prompty-0.1.22}/prompty/azure/executor.py +0 -0
  9. {prompty-0.1.21 → prompty-0.1.22}/prompty/azure/processor.py +0 -0
  10. {prompty-0.1.21 → prompty-0.1.22}/prompty/cli.py +0 -0
  11. {prompty-0.1.21 → prompty-0.1.22}/prompty/core.py +0 -0
  12. {prompty-0.1.21 → prompty-0.1.22}/prompty/openai/__init__.py +0 -0
  13. {prompty-0.1.21 → prompty-0.1.22}/prompty/openai/executor.py +0 -0
  14. {prompty-0.1.21 → prompty-0.1.22}/prompty/openai/processor.py +0 -0
  15. {prompty-0.1.21 → prompty-0.1.22}/prompty/parsers.py +0 -0
  16. {prompty-0.1.21 → prompty-0.1.22}/prompty/renderers.py +0 -0
  17. {prompty-0.1.21 → prompty-0.1.22}/prompty/serverless/__init__.py +0 -0
  18. {prompty-0.1.21 → prompty-0.1.22}/prompty/serverless/executor.py +0 -0
  19. {prompty-0.1.21 → prompty-0.1.22}/prompty/serverless/processor.py +0 -0
  20. {prompty-0.1.21 → prompty-0.1.22}/tests/fake_azure_executor.py +0 -0
  21. {prompty-0.1.21 → prompty-0.1.22}/tests/fake_serverless_executor.py +0 -0
  22. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/1contoso.md +0 -0
  23. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/2contoso.md +0 -0
  24. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/3contoso.md +0 -0
  25. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/4contoso.md +0 -0
  26. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/basic.prompty.md +0 -0
  27. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/camping.jpg +0 -0
  28. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/context.prompty.md +0 -0
  29. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/contoso_multi.md +0 -0
  30. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/faithfulness.prompty.md +0 -0
  31. {prompty-0.1.21 → prompty-0.1.22}/tests/generated/groundedness.prompty.md +0 -0
  32. {prompty-0.1.21 → prompty-0.1.22}/tests/hello_world-goodbye_world-hello_again.embedding.json +0 -0
  33. {prompty-0.1.21 → prompty-0.1.22}/tests/hello_world.embedding.json +0 -0
  34. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/__init__.py +0 -0
  35. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/basic.prompty +0 -0
  36. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/basic.prompty.execution.json +0 -0
  37. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/basic_json_output.prompty +0 -0
  38. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/camping.jpg +0 -0
  39. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/chat.prompty +0 -0
  40. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/context.json +0 -0
  41. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/context.prompty +0 -0
  42. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/context.prompty.execution.json +0 -0
  43. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/embedding.prompty +0 -0
  44. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/embedding.prompty.execution.json +0 -0
  45. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/evaluation.prompty +0 -0
  46. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/faithfulness.prompty +0 -0
  47. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/faithfulness.prompty.execution.json +0 -0
  48. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/fake.prompty +0 -0
  49. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/funcfile.json +0 -0
  50. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/funcfile.prompty +0 -0
  51. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/functions.prompty +0 -0
  52. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/functions.prompty.execution.json +0 -0
  53. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/groundedness.prompty +0 -0
  54. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/groundedness.prompty.execution.json +0 -0
  55. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/prompty.json +0 -0
  56. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/serverless.prompty +0 -0
  57. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/serverless.prompty.execution.json +0 -0
  58. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/serverless_stream.prompty +0 -0
  59. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/serverless_stream.prompty.execution.json +0 -0
  60. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/streaming.prompty +0 -0
  61. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/streaming.prompty.execution.json +0 -0
  62. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/sub/__init__.py +0 -0
  63. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/sub/basic.prompty +0 -0
  64. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/sub/sub/__init__.py +0 -0
  65. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/sub/sub/basic.prompty +0 -0
  66. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/sub/sub/prompty.json +0 -0
  67. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/sub/sub/test.py +0 -0
  68. {prompty-0.1.21 → prompty-0.1.22}/tests/prompts/test.py +0 -0
  69. {prompty-0.1.21 → prompty-0.1.22}/tests/prompty.json +0 -0
  70. {prompty-0.1.21 → prompty-0.1.22}/tests/test_common.py +0 -0
  71. {prompty-0.1.21 → prompty-0.1.22}/tests/test_execute.py +0 -0
  72. {prompty-0.1.21 → prompty-0.1.22}/tests/test_factory_invoker.py +0 -0
  73. {prompty-0.1.21 → prompty-0.1.22}/tests/test_path_exec.py +0 -0
  74. {prompty-0.1.21 → 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.21
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, 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)
@@ -153,7 +153,7 @@ def _trace_sync(
153
153
 
154
154
 
155
155
  def _trace_async(
156
- func: Callable = None, *, description: str = None, type: 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 type and type != "":
169
- trace("type", 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, type: 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, type=type)
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, type=type)
203
+ return wrapped_method(func, description=description, itemtype=itemtype)
204
204
 
205
205
 
206
206
  class PromptyTracer:
@@ -13,7 +13,7 @@ dependencies = [
13
13
  "python-dotenv>=1.0.1",
14
14
  "click>=8.1.7",
15
15
  ]
16
- version = "0.1.21"
16
+ version = "0.1.22"
17
17
 
18
18
  [project.optional-dependencies]
19
19
  azure = [
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