prompty 1.0.0b1__tar.gz → 1.0.0b2__tar.gz
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-1.0.0b1 → prompty-1.0.0b2}/PKG-INFO +1 -1
- prompty-1.0.0b2/prompty/_version.py +1 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/azure/executor.py +6 -6
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_agent.py +7 -1
- prompty-1.0.0b1/prompty/_version.py +0 -1
- {prompty-1.0.0b1 → prompty-1.0.0b2}/.gitignore +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/.vscode/settings.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/LICENSE +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/README.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/__init__.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/azure/__init__.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/azure/processor.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/cli.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/common.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/core.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/invoker.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/openai/__init__.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/openai/executor.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/openai/processor.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/parsers.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/py.typed +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/renderers.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/serverless/__init__.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/serverless/executor.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/serverless/processor.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/tracer.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/prompty/utils.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/pyproject.toml +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/__init__.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/agent/simple_agent.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/agent/simple_agent.prompty.1.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/agent/simple_agent.prompty.2.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/coverage.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/fake_azure_executor.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/fake_serverless_executor.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/1contoso.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/2contoso.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/3contoso.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/4contoso.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/basic.prompty.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/camping.jpg +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/context.prompty.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/contoso_multi.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/faithfulness.prompty.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/generated/groundedness.prompty.md +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/hello_world-goodbye_world-hello_again.embedding.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/hello_world.embedding.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/mustache/basic.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/__init__.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/agent.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/basic.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/basic.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/basic_json_output.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/basic_mustache.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/camping.jpg +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/chat.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/context.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/context.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/context.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/embedding.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/embedding.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/evaluation.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/faithfulness.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/faithfulness.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/fake.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/func_inline.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/funcfile.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/funcfile.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/functions.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/functions.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/groundedness.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/groundedness.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/prompty.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/serverless.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/serverless.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/serverless_stream.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/serverless_stream.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/streaming.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/streaming.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/structured_complex.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/structured_inline.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/structured_output.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/structured_output_schema.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/sub/__init__.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/sub/basic.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/sub/sub/__init__.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/sub/sub/basic.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/sub/sub/prompty.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/sub/sub/test.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/test.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompts/threaded_chat.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/prompty.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/properties/basic_array.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/properties/basic_dictionary.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/properties/basic_mixed.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/properties/thread_split.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/response/structured_complex.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/response/structured_complex.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/response/structured_complex_other.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/response/structured_complex_other.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/response/structured_inline.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/response/structured_inline.prompty.execution.json +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_common.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_conversion.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_core.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_execute.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_factory_invoker.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_mustache.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_parser.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_path_exec.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_tools.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/test_tracing.py +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/tools/basic.prompty +0 -0
- {prompty-1.0.0b1 → prompty-1.0.0b2}/tests/tools/dynamic.prompty +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: prompty
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.0b2
|
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-Python: >=3.9
|
@@ -0,0 +1 @@
|
|
1
|
+
VERSION = "1.0.0b2"
|
@@ -226,10 +226,10 @@ class AzureOpenAIExecutor(Invoker):
|
|
226
226
|
return tool
|
227
227
|
|
228
228
|
def _execute_agent(self, client: AzureOpenAI, data: typing.Any) -> typing.Any:
|
229
|
-
with Tracer.start("
|
230
|
-
trace("type", "
|
229
|
+
with Tracer.start("AgentLoop") as trace:
|
230
|
+
trace("type", "agent")
|
231
231
|
trace("description", "Azure OpenAI Client")
|
232
|
-
trace("signature", "
|
232
|
+
trace("signature", "prompty.azure.AzureOpenAIExecutor.AgentLoop")
|
233
233
|
|
234
234
|
trace("inputs", data)
|
235
235
|
|
@@ -276,10 +276,10 @@ class AzureOpenAIExecutor(Invoker):
|
|
276
276
|
return response
|
277
277
|
|
278
278
|
async def _execute_agent_async(self, client: AsyncAzureOpenAI, data: typing.Any) -> typing.Any:
|
279
|
-
with Tracer.start("
|
280
|
-
trace("type", "
|
279
|
+
with Tracer.start("AgentLoopAsync") as trace:
|
280
|
+
trace("type", "agent")
|
281
281
|
trace("description", "Azure OpenAI Client")
|
282
|
-
trace("signature", "
|
282
|
+
trace("signature", "prompty.azure.AzureOpenAIExecutor.AgentLoopAsync")
|
283
283
|
|
284
284
|
trace("inputs", data)
|
285
285
|
|
@@ -10,7 +10,7 @@ import prompty
|
|
10
10
|
from prompty.azure import AzureOpenAIProcessor
|
11
11
|
from prompty.invoker import InvokerFactory
|
12
12
|
from prompty.serverless import ServerlessProcessor
|
13
|
-
from prompty.tracer import trace
|
13
|
+
from prompty.tracer import PromptyTracer, Tracer, console_tracer, trace
|
14
14
|
from tests.fake_serverless_executor import FakeServerlessExecutor
|
15
15
|
|
16
16
|
load_dotenv()
|
@@ -40,7 +40,12 @@ def fake_azure_executor():
|
|
40
40
|
InvokerFactory.add_executor("serverless", FakeServerlessExecutor)
|
41
41
|
InvokerFactory.add_processor("serverless", ServerlessProcessor)
|
42
42
|
|
43
|
+
Tracer.add("console", console_tracer)
|
44
|
+
json_tracer = PromptyTracer()
|
45
|
+
Tracer.add("PromptyTracer", json_tracer.tracer)
|
43
46
|
|
47
|
+
|
48
|
+
@trace
|
44
49
|
@pytest.mark.parametrize(
|
45
50
|
"prompt",
|
46
51
|
[
|
@@ -59,6 +64,7 @@ def test_execute_agent(prompt: str):
|
|
59
64
|
return result
|
60
65
|
|
61
66
|
|
67
|
+
@trace
|
62
68
|
@pytest.mark.asyncio
|
63
69
|
@pytest.mark.parametrize(
|
64
70
|
"prompt",
|
@@ -1 +0,0 @@
|
|
1
|
-
VERSION = "1.0.0b1"
|
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
|
{prompty-1.0.0b1 → prompty-1.0.0b2}/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
|
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-1.0.0b1 → prompty-1.0.0b2}/tests/response/structured_complex.prompty.execution.json
RENAMED
File without changes
|
File without changes
|
{prompty-1.0.0b1 → prompty-1.0.0b2}/tests/response/structured_complex_other.prompty.execution.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
|