promptlayer 1.0.68__py3-none-any.whl → 1.0.70__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.
Potentially problematic release.
This version of promptlayer might be problematic. Click here for more details.
- promptlayer/__init__.py +1 -1
- promptlayer/templates.py +4 -4
- promptlayer/utils.py +10 -4
- {promptlayer-1.0.68.dist-info → promptlayer-1.0.70.dist-info}/METADATA +4 -2
- {promptlayer-1.0.68.dist-info → promptlayer-1.0.70.dist-info}/RECORD +7 -7
- {promptlayer-1.0.68.dist-info → promptlayer-1.0.70.dist-info}/WHEEL +1 -1
- {promptlayer-1.0.68.dist-info → promptlayer-1.0.70.dist-info/licenses}/LICENSE +0 -0
promptlayer/__init__.py
CHANGED
promptlayer/templates.py
CHANGED
|
@@ -20,8 +20,8 @@ class TemplateManager:
|
|
|
20
20
|
def publish(self, body: PublishPromptTemplate):
|
|
21
21
|
return publish_prompt_template(body, self.api_key)
|
|
22
22
|
|
|
23
|
-
def all(self, page: int = 1, per_page: int = 30):
|
|
24
|
-
return get_all_prompt_templates(page, per_page, self.api_key)
|
|
23
|
+
def all(self, page: int = 1, per_page: int = 30, label: str = None):
|
|
24
|
+
return get_all_prompt_templates(page, per_page, self.api_key, label)
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class AsyncTemplateManager:
|
|
@@ -31,5 +31,5 @@ class AsyncTemplateManager:
|
|
|
31
31
|
async def get(self, prompt_name: str, params: Union[GetPromptTemplate, None] = None):
|
|
32
32
|
return await aget_prompt_template(prompt_name, params, self.api_key)
|
|
33
33
|
|
|
34
|
-
async def all(self, page: int = 1, per_page: int = 30):
|
|
35
|
-
return await aget_all_prompt_templates(page, per_page, self.api_key)
|
|
34
|
+
async def all(self, page: int = 1, per_page: int = 30, label: str = None):
|
|
35
|
+
return await aget_all_prompt_templates(page, per_page, self.api_key, label)
|
promptlayer/utils.py
CHANGED
|
@@ -1193,13 +1193,16 @@ async def apublish_prompt_template(
|
|
|
1193
1193
|
|
|
1194
1194
|
|
|
1195
1195
|
def get_all_prompt_templates(
|
|
1196
|
-
page: int = 1, per_page: int = 30, api_key: str = None
|
|
1196
|
+
page: int = 1, per_page: int = 30, api_key: str = None, label: str = None
|
|
1197
1197
|
) -> List[ListPromptTemplateResponse]:
|
|
1198
1198
|
try:
|
|
1199
|
+
params = {"page": page, "per_page": per_page}
|
|
1200
|
+
if label:
|
|
1201
|
+
params["label"] = label
|
|
1199
1202
|
response = requests.get(
|
|
1200
1203
|
f"{URL_API_PROMPTLAYER}/prompt-templates",
|
|
1201
1204
|
headers={"X-API-KEY": api_key},
|
|
1202
|
-
params=
|
|
1205
|
+
params=params,
|
|
1203
1206
|
)
|
|
1204
1207
|
if response.status_code != 200:
|
|
1205
1208
|
raise Exception(
|
|
@@ -1212,14 +1215,17 @@ def get_all_prompt_templates(
|
|
|
1212
1215
|
|
|
1213
1216
|
|
|
1214
1217
|
async def aget_all_prompt_templates(
|
|
1215
|
-
page: int = 1, per_page: int = 30, api_key: str = None
|
|
1218
|
+
page: int = 1, per_page: int = 30, api_key: str = None, label: str = None
|
|
1216
1219
|
) -> List[ListPromptTemplateResponse]:
|
|
1217
1220
|
try:
|
|
1221
|
+
params = {"page": page, "per_page": per_page}
|
|
1222
|
+
if label:
|
|
1223
|
+
params["label"] = label
|
|
1218
1224
|
async with _make_httpx_client() as client:
|
|
1219
1225
|
response = await client.get(
|
|
1220
1226
|
f"{URL_API_PROMPTLAYER}/prompt-templates",
|
|
1221
1227
|
headers={"X-API-KEY": api_key},
|
|
1222
|
-
params=
|
|
1228
|
+
params=params,
|
|
1223
1229
|
)
|
|
1224
1230
|
|
|
1225
1231
|
if RAISE_FOR_STATUS:
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: promptlayer
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.70
|
|
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
9
|
Requires-Python: >=3.9,<4.0
|
|
@@ -13,6 +14,7 @@ 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
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
18
|
Requires-Dist: ably (>=2.0.11,<3.0.0)
|
|
17
19
|
Requires-Dist: aiohttp (>=3.10.10,<4.0.0)
|
|
18
20
|
Requires-Dist: httpx (>=0.28.1,<0.29.0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
promptlayer/__init__.py,sha256=
|
|
1
|
+
promptlayer/__init__.py,sha256=rmNkVTlgU9h1Mc6KGq3S6-3u1O86hdDAOxZ7xU4xxJo,140
|
|
2
2
|
promptlayer/groups/__init__.py,sha256=xhOAolLUBkr76ZHvJr29OwjCIk1V9qKQXjZCuyTJUIY,429
|
|
3
3
|
promptlayer/groups/groups.py,sha256=YPROicy-TzpkrpA8vOpZS2lwvJ6VRtlbQ1S2oT1N0vM,338
|
|
4
4
|
promptlayer/promptlayer.py,sha256=hxzzq5bXkOJXvRCbBmtDLCSb4JlozpTJ00Ofk5Y_pQg,22901
|
|
@@ -9,14 +9,14 @@ promptlayer/streaming/__init__.py,sha256=nKWwUsAy4FjJLT6rxntXCyVlKOov-xT2dk7sOXr
|
|
|
9
9
|
promptlayer/streaming/blueprint_builder.py,sha256=lz4aGo_1tytuPB7AkA3y-xyl1ZQHnHOA2fZZl5CaK2Q,12769
|
|
10
10
|
promptlayer/streaming/response_handlers.py,sha256=wtl9ubb0kEB-ZuIpl0_kOvw9wZI4XRKyKqT3-d4EtWE,35410
|
|
11
11
|
promptlayer/streaming/stream_processor.py,sha256=atnaBg31kmTPSF433DF7uV3jiLuJOnA5Vz8tVCQ5v2Y,4083
|
|
12
|
-
promptlayer/templates.py,sha256=
|
|
12
|
+
promptlayer/templates.py,sha256=oRCuELDet8SAKhtqNvyLQpOAa9sVesJwIBEFX1PbXd4,1231
|
|
13
13
|
promptlayer/track/__init__.py,sha256=tyweLTAY7UpYpBHWwY-T3pOPDIlGjcgccYXqU_r0694,1710
|
|
14
14
|
promptlayer/track/track.py,sha256=A-awcYwsSwxktrlCMchy8NITIquwxU1UXbgLZMwqrA0,3164
|
|
15
15
|
promptlayer/types/__init__.py,sha256=xJcvQuOk91ZBBePb40-1FDNDKYrZoH5lPE2q6_UhprM,111
|
|
16
16
|
promptlayer/types/prompt_template.py,sha256=cqxNX9QQHKh1lwpwSp-IjNI8Yw9jOVNI3frAflz23sQ,5155
|
|
17
17
|
promptlayer/types/request_log.py,sha256=xU6bcxQar6GaBOJlgZTavXUV3FjE8sF_nSjPu4Ya_00,174
|
|
18
|
-
promptlayer/utils.py,sha256=
|
|
19
|
-
promptlayer-1.0.
|
|
20
|
-
promptlayer-1.0.
|
|
21
|
-
promptlayer-1.0.
|
|
22
|
-
promptlayer-1.0.
|
|
18
|
+
promptlayer/utils.py,sha256=bcNQc9MvJXP5vaYDKzQqkG2iJ60pes1lPozFgCxuwns,61199
|
|
19
|
+
promptlayer-1.0.70.dist-info/METADATA,sha256=1k36X6MGhGnyv_RJZ_pm868y9QHes8ZGj9P_nAVkkW0,4892
|
|
20
|
+
promptlayer-1.0.70.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
21
|
+
promptlayer-1.0.70.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
22
|
+
promptlayer-1.0.70.dist-info/RECORD,,
|
|
File without changes
|