prompty 0.1.13__tar.gz → 0.1.14__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {prompty-0.1.13 → prompty-0.1.14}/PKG-INFO +1 -1
- {prompty-0.1.13 → prompty-0.1.14}/prompty/__init__.py +2 -2
- {prompty-0.1.13 → prompty-0.1.14}/prompty/serverless/executor.py +2 -0
- {prompty-0.1.13 → prompty-0.1.14}/pyproject.toml +1 -1
- {prompty-0.1.13 → prompty-0.1.14}/LICENSE +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/README.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/azure/__init__.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/azure/executor.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/azure/processor.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/cli.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/core.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/openai/__init__.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/openai/executor.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/openai/processor.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/parsers.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/renderers.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/serverless/__init__.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/serverless/processor.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/prompty/tracer.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/fake_azure_executor.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/fake_serverless_executor.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/1contoso.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/2contoso.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/3contoso.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/4contoso.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/basic.prompty.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/camping.jpg +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/context.prompty.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/contoso_multi.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/faithfulness.prompty.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/generated/groundedness.prompty.md +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/hello_world-goodbye_world-hello_again.embedding.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/hello_world.embedding.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/__init__.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/basic.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/basic.prompty.execution.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/basic_json_output.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/camping.jpg +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/chat.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/context.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/context.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/context.prompty.execution.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/embedding.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/embedding.prompty.execution.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/evaluation.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/faithfulness.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/faithfulness.prompty.execution.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/fake.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/funcfile.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/funcfile.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/functions.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/functions.prompty.execution.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/groundedness.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/groundedness.prompty.execution.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/prompty.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/serverless.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/serverless.prompty.execution.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/serverless_stream.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/serverless_stream.prompty.execution.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/streaming.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/streaming.prompty.execution.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/sub/__init__.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/sub/basic.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/sub/sub/__init__.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/sub/sub/basic.prompty +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/sub/sub/prompty.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/sub/sub/test.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompts/test.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/prompty.json +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/test_common.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/test_execute.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/test_factory_invoker.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/tests/test_path_exec.py +0 -0
- {prompty-0.1.13 → prompty-0.1.14}/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.14
|
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
|
@@ -344,7 +344,7 @@ def execute(
|
|
344
344
|
parameters: Dict[str, any] = {},
|
345
345
|
inputs: Dict[str, any] = {},
|
346
346
|
raw: bool = False,
|
347
|
-
|
347
|
+
config_name: str = "default",
|
348
348
|
):
|
349
349
|
"""Execute a prompty.
|
350
350
|
|
@@ -380,7 +380,7 @@ def execute(
|
|
380
380
|
# get caller's path (take into account trace frame)
|
381
381
|
caller = Path(traceback.extract_stack()[-3].filename)
|
382
382
|
path = Path(caller.parent / path).resolve().absolute()
|
383
|
-
prompt = load(path,
|
383
|
+
prompt = load(path, config_name)
|
384
384
|
|
385
385
|
# prepare content
|
386
386
|
content = prepare(prompt, inputs)
|
@@ -46,6 +46,7 @@ class ServerlessExecutor(Invoker):
|
|
46
46
|
response = ChatCompletionsClient(
|
47
47
|
endpoint=self.endpoint,
|
48
48
|
credential=AzureKeyCredential(self.key),
|
49
|
+
user_agent=f"prompty/{VERSION}"
|
49
50
|
).complete(
|
50
51
|
model=self.model,
|
51
52
|
messages=data if isinstance(data, list) else [data],
|
@@ -61,6 +62,7 @@ class ServerlessExecutor(Invoker):
|
|
61
62
|
response = EmbeddingsClient(
|
62
63
|
endpoint=self.endpoint,
|
63
64
|
credential=AzureKeyCredential(self.key),
|
65
|
+
user_agent=f"prompty/{VERSION}",
|
64
66
|
).complete(
|
65
67
|
model=self.model,
|
66
68
|
input=data if isinstance(data, list) else [data],
|
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.13 → prompty-0.1.14}/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
|