promptlayer 1.0.35__py3-none-any.whl → 1.0.78__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.
- promptlayer/__init__.py +37 -2
- promptlayer/exceptions.py +119 -0
- promptlayer/groups/__init__.py +9 -5
- promptlayer/groups/groups.py +4 -6
- promptlayer/promptlayer.py +237 -104
- promptlayer/promptlayer_base.py +31 -40
- promptlayer/promptlayer_mixins.py +216 -65
- promptlayer/span_exporter.py +19 -24
- promptlayer/streaming/__init__.py +64 -0
- promptlayer/streaming/blueprint_builder.py +382 -0
- promptlayer/streaming/response_handlers.py +960 -0
- promptlayer/streaming/stream_processor.py +106 -0
- promptlayer/templates.py +14 -12
- promptlayer/track/__init__.py +32 -20
- promptlayer/track/track.py +47 -30
- promptlayer/types/prompt_template.py +33 -1
- promptlayer/utils.py +1256 -967
- {promptlayer-1.0.35.dist-info → promptlayer-1.0.78.dist-info}/METADATA +16 -12
- promptlayer-1.0.78.dist-info/RECORD +23 -0
- {promptlayer-1.0.35.dist-info → promptlayer-1.0.78.dist-info}/WHEEL +1 -1
- promptlayer-1.0.35.dist-info/RECORD +0 -18
- {promptlayer-1.0.35.dist-info → promptlayer-1.0.78.dist-info/licenses}/LICENSE +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: promptlayer
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.78
|
|
4
4
|
Summary: PromptLayer is a platform for prompt engineering and tracks your LLM requests.
|
|
5
5
|
License: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: Magniv
|
|
7
8
|
Author-email: hello@magniv.io
|
|
8
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.9,<4.0
|
|
9
10
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
11
|
Classifier: Programming Language :: Python :: 3
|
|
11
12
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -13,13 +14,16 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
13
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Requires-Dist: ably (>=2.0.11,<3.0.0)
|
|
17
19
|
Requires-Dist: aiohttp (>=3.10.10,<4.0.0)
|
|
18
|
-
Requires-Dist:
|
|
20
|
+
Requires-Dist: centrifuge-python (>=0.4.1,<0.5.0)
|
|
21
|
+
Requires-Dist: httpx (>=0.28.1,<0.29.0)
|
|
19
22
|
Requires-Dist: nest-asyncio (>=1.6.0,<2.0.0)
|
|
20
23
|
Requires-Dist: opentelemetry-api (>=1.26.0,<2.0.0)
|
|
21
24
|
Requires-Dist: opentelemetry-sdk (>=1.26.0,<2.0.0)
|
|
22
25
|
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
26
|
+
Requires-Dist: tenacity (>=9.1.2,<10.0.0)
|
|
23
27
|
Description-Content-Type: text/markdown
|
|
24
28
|
|
|
25
29
|
<div align="center">
|
|
@@ -32,11 +36,11 @@ Description-Content-Type: text/markdown
|
|
|
32
36
|
<a href="https://docs.promptlayer.com"><img alt="Docs" src="https://custom-icon-badges.herokuapp.com/badge/docs-PL-green.svg?logo=cake&style=for-the-badge"></a>
|
|
33
37
|
<a href="https://www.loom.com/share/196c42e43acd4a369d75e9a7374a0850"><img alt="Demo with Loom" src="https://img.shields.io/badge/Demo-loom-552586.svg?logo=loom&style=for-the-badge&labelColor=gray"></a>
|
|
34
38
|
|
|
35
|
-
---
|
|
39
|
+
---
|
|
36
40
|
|
|
37
41
|
<div align="left">
|
|
38
42
|
|
|
39
|
-
[PromptLayer](https://promptlayer.com/) is the first platform that allows you to track, manage, and share your GPT prompt engineering. PromptLayer acts a middleware between your code and OpenAI’s python library.
|
|
43
|
+
[PromptLayer](https://promptlayer.com/) is the first platform that allows you to track, manage, and share your GPT prompt engineering. PromptLayer acts a middleware between your code and OpenAI’s python library.
|
|
40
44
|
|
|
41
45
|
PromptLayer records all your OpenAI API requests, allowing you to search and explore request history in the PromptLayer dashboard.
|
|
42
46
|
|
|
@@ -77,14 +81,14 @@ openai = promptlayer.openai
|
|
|
77
81
|
|
|
78
82
|
### Adding PromptLayer tags: `pl_tags`
|
|
79
83
|
|
|
80
|
-
PromptLayer allows you to add tags through the `pl_tags` argument. This allows you to track and group requests in the dashboard.
|
|
84
|
+
PromptLayer allows you to add tags through the `pl_tags` argument. This allows you to track and group requests in the dashboard.
|
|
81
85
|
|
|
82
86
|
*Tags are not required but we recommend them!*
|
|
83
87
|
|
|
84
88
|
```python
|
|
85
89
|
openai.Completion.create(
|
|
86
|
-
engine="text-ada-001",
|
|
87
|
-
prompt="My name is",
|
|
90
|
+
engine="text-ada-001",
|
|
91
|
+
prompt="My name is",
|
|
88
92
|
pl_tags=["name-guessing", "pipeline-2"]
|
|
89
93
|
)
|
|
90
94
|
```
|
|
@@ -93,11 +97,11 @@ After making your first few requests, you should be able to see them in the Prom
|
|
|
93
97
|
|
|
94
98
|
## Using the REST API
|
|
95
99
|
|
|
96
|
-
This Python library is a wrapper over PromptLayer's REST API. If you use another language, like Javascript, just interact directly with the API.
|
|
100
|
+
This Python library is a wrapper over PromptLayer's REST API. If you use another language, like Javascript, just interact directly with the API.
|
|
97
101
|
|
|
98
102
|
Here is an example request below:
|
|
99
103
|
|
|
100
|
-
```
|
|
104
|
+
```python
|
|
101
105
|
import requests
|
|
102
106
|
request_response = requests.post(
|
|
103
107
|
"https://api.promptlayer.com/track-request",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
promptlayer/__init__.py,sha256=pveFz6sTtgrSdV8J30P3gGlxGS5CLJhv9pqjgPx9Dxs,1130
|
|
2
|
+
promptlayer/exceptions.py,sha256=uERG7eGVrpFxT6Liuhl1BM0ntQTYmfVvulyRit2rxFc,2782
|
|
3
|
+
promptlayer/groups/__init__.py,sha256=pUBynk9iWzX8e2alhyiLn5tloc5PmWA4SvFzDdE9DTw,724
|
|
4
|
+
promptlayer/groups/groups.py,sha256=4rut8h2LvqAPNr5MG97vdvOAt1URzObl0aWEgRESHWU,368
|
|
5
|
+
promptlayer/promptlayer.py,sha256=_9J3_OrSBwbkk0W5EuMfBgylP9VoN1_VSPXjT9HCNj0,26351
|
|
6
|
+
promptlayer/promptlayer_base.py,sha256=4iv1jA8gRw2nT5C-0dKEMS3x-FI5gmg8S4eMXFcnxeU,7477
|
|
7
|
+
promptlayer/promptlayer_mixins.py,sha256=otVCbEkfbHLUnMPcCaViTEaXUds-JAV9UnwcmtD2q6w,16315
|
|
8
|
+
promptlayer/span_exporter.py,sha256=5dufK_Qu__RazRXs3HV7kqn2YVWsxBwt9R4tmXlVdzU,2725
|
|
9
|
+
promptlayer/streaming/__init__.py,sha256=nKWwUsAy4FjJLT6rxntXCyVlKOov-xT2dk7sOXrgpUs,1897
|
|
10
|
+
promptlayer/streaming/blueprint_builder.py,sha256=urTA7TLSc_5DgDbp2MbTW7NKT9ZVMj5KagMcWtQo7S4,16041
|
|
11
|
+
promptlayer/streaming/response_handlers.py,sha256=LUPlaahsI-iTspWhZaD4Qxw3NI2I6shwpSOTEbcclac,35760
|
|
12
|
+
promptlayer/streaming/stream_processor.py,sha256=atnaBg31kmTPSF433DF7uV3jiLuJOnA5Vz8tVCQ5v2Y,4083
|
|
13
|
+
promptlayer/templates.py,sha256=tiCKgTzytzNOwFdq_UFbaQrCGakWeYAPjF5n9uM0nao,1641
|
|
14
|
+
promptlayer/track/__init__.py,sha256=a1rCuaxNeweBNZVXPoNnmBXKeiU_PXjOLqxapYopEeo,2276
|
|
15
|
+
promptlayer/track/track.py,sha256=hvCQSY6JlDsk4NzmibF1Zbg1DairOpmFLcmVLeJ1cu0,4567
|
|
16
|
+
promptlayer/types/__init__.py,sha256=xJcvQuOk91ZBBePb40-1FDNDKYrZoH5lPE2q6_UhprM,111
|
|
17
|
+
promptlayer/types/prompt_template.py,sha256=5Tjp6I3s_L-i_-LkB7ZsQDVBHd2j5xUQpuSnJZ2nIlI,5672
|
|
18
|
+
promptlayer/types/request_log.py,sha256=xU6bcxQar6GaBOJlgZTavXUV3FjE8sF_nSjPu4Ya_00,174
|
|
19
|
+
promptlayer/utils.py,sha256=VvHCNrRqRWZPC73n7H3Zx2s21_hDfgwtX4PZpryw71M,78341
|
|
20
|
+
promptlayer-1.0.78.dist-info/METADATA,sha256=pCcesGKRREAWn5TjmxQ62-wKslWTBQ5JV0AaQ3_p9_4,4984
|
|
21
|
+
promptlayer-1.0.78.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
22
|
+
promptlayer-1.0.78.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
23
|
+
promptlayer-1.0.78.dist-info/RECORD,,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
promptlayer/__init__.py,sha256=dFpNbPOHBuDshY839zXzop7gunXGaL__KEY-MITViQ8,140
|
|
2
|
-
promptlayer/groups/__init__.py,sha256=xhOAolLUBkr76ZHvJr29OwjCIk1V9qKQXjZCuyTJUIY,429
|
|
3
|
-
promptlayer/groups/groups.py,sha256=YPROicy-TzpkrpA8vOpZS2lwvJ6VRtlbQ1S2oT1N0vM,338
|
|
4
|
-
promptlayer/promptlayer.py,sha256=rMqH5c-NpfGo41gbaZdurXvUIOa6-QJWDAZ4W5ajJko,20119
|
|
5
|
-
promptlayer/promptlayer_base.py,sha256=sev-EZehRXJSZSmJtMkqmAUK1345pqbDY_lNjPP5MYA,7158
|
|
6
|
-
promptlayer/promptlayer_mixins.py,sha256=_7LRo8Mj8FhkIQZByEh2gX_lS0GjB6Bo94k0QWFJVMM,10260
|
|
7
|
-
promptlayer/span_exporter.py,sha256=zIJNsb3Fe6yb5wKLDmkoPF2wqFjk1p39E0jWHD2plzI,2658
|
|
8
|
-
promptlayer/templates.py,sha256=bdX8ZxydWwF9QMF1UBD-qoYqYRPrUSTAt88r2D8ws7c,1193
|
|
9
|
-
promptlayer/track/__init__.py,sha256=8J258daTXb_P8eHRbYR2Au1lJzTh_92UkOHf7q0NpKs,1757
|
|
10
|
-
promptlayer/track/track.py,sha256=UdkCxhWUvhvPdhsoHj4qmeiRq6xLcWmeIdYXrgZph04,3252
|
|
11
|
-
promptlayer/types/__init__.py,sha256=xJcvQuOk91ZBBePb40-1FDNDKYrZoH5lPE2q6_UhprM,111
|
|
12
|
-
promptlayer/types/prompt_template.py,sha256=GoYSorgBmUgvtyXaGAOv0KgVC61Llzn8bND6PF1fW50,4929
|
|
13
|
-
promptlayer/types/request_log.py,sha256=xU6bcxQar6GaBOJlgZTavXUV3FjE8sF_nSjPu4Ya_00,174
|
|
14
|
-
promptlayer/utils.py,sha256=230OFFkG2DoaRCh-sgUZNoQxKEQT0RVKW3jJ6CciQKo,59465
|
|
15
|
-
promptlayer-1.0.35.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
16
|
-
promptlayer-1.0.35.dist-info/METADATA,sha256=zD5IK9Hpmp19t_0GFAEBo2LWi72IrU1J8fRIKWLragA,4824
|
|
17
|
-
promptlayer-1.0.35.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
|
18
|
-
promptlayer-1.0.35.dist-info/RECORD,,
|
|
File without changes
|