promptlayer 1.0.6__py3-none-any.whl → 1.0.8__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 +2 -2
- promptlayer/types/prompt_template.py +2 -2
- promptlayer/utils.py +5 -2
- {promptlayer-1.0.6.dist-info → promptlayer-1.0.8.dist-info}/METADATA +1 -1
- {promptlayer-1.0.6.dist-info → promptlayer-1.0.8.dist-info}/RECORD +7 -7
- {promptlayer-1.0.6.dist-info → promptlayer-1.0.8.dist-info}/LICENSE +0 -0
- {promptlayer-1.0.6.dist-info → promptlayer-1.0.8.dist-info}/WHEEL +0 -0
promptlayer/__init__.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import os
|
|
3
3
|
from copy import deepcopy
|
|
4
|
-
from typing import Dict, List, Literal, Union
|
|
4
|
+
from typing import Any, Dict, List, Literal, Union
|
|
5
5
|
|
|
6
6
|
from promptlayer.groups import GroupManager
|
|
7
7
|
from promptlayer.promptlayer import PromptLayerBase
|
|
@@ -90,7 +90,7 @@ class PromptLayer:
|
|
|
90
90
|
prompt_name: str,
|
|
91
91
|
prompt_version: Union[int, None] = None,
|
|
92
92
|
prompt_release_label: Union[str, None] = None,
|
|
93
|
-
input_variables: Union[Dict[str,
|
|
93
|
+
input_variables: Union[Dict[str, Any], None] = None,
|
|
94
94
|
tags: Union[List[str], None] = None,
|
|
95
95
|
metadata: Union[Dict[str, str], None] = None,
|
|
96
96
|
group_id: Union[int, None] = None,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Dict, List, Literal, Optional, Sequence, TypedDict, Union
|
|
1
|
+
from typing import Any, Dict, List, Literal, Optional, Sequence, TypedDict, Union
|
|
2
2
|
|
|
3
3
|
from typing_extensions import Required
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ class GetPromptTemplate(TypedDict, total=False):
|
|
|
7
7
|
version: int
|
|
8
8
|
label: str
|
|
9
9
|
provider: str
|
|
10
|
-
input_variables: Dict[str,
|
|
10
|
+
input_variables: Dict[str, Any]
|
|
11
11
|
metadata_filters: Dict[str, str]
|
|
12
12
|
|
|
13
13
|
|
promptlayer/utils.py
CHANGED
|
@@ -436,8 +436,11 @@ class GeneratorProxy:
|
|
|
436
436
|
response = f"{response}{result.completion}"
|
|
437
437
|
elif hasattr(result, "message") and isinstance(result.message, str):
|
|
438
438
|
response = f"{response}{result.message}"
|
|
439
|
-
elif
|
|
440
|
-
result
|
|
439
|
+
elif (
|
|
440
|
+
hasattr(result, "content_block")
|
|
441
|
+
and hasattr(result.content_block, "text")
|
|
442
|
+
and "type" in result
|
|
443
|
+
and result.type != "message_stop"
|
|
441
444
|
):
|
|
442
445
|
response = f"{response}{result.content_block.text}"
|
|
443
446
|
elif hasattr(result, "delta") and hasattr(result.delta, "text"):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
promptlayer/__init__.py,sha256=
|
|
1
|
+
promptlayer/__init__.py,sha256=Soo7M8Pc7RxVQHFg81MIjsDCsumzebSeD87BtP54JzY,6358
|
|
2
2
|
promptlayer/groups/__init__.py,sha256=-xs-2cn0nc0D_5YxZr3nC86iTdRVZmBhEpOKDJXE-sQ,224
|
|
3
3
|
promptlayer/groups/groups.py,sha256=yeO6T0TM3qB0ondZRiHhcH8G06YygrpFoM8b9RmoIao,165
|
|
4
4
|
promptlayer/promptlayer.py,sha256=1q1cZOBt27Luzu3aRWcYUjQiKbmwrF9R62Uw95Ryqqc,4035
|
|
@@ -6,9 +6,9 @@ promptlayer/templates.py,sha256=aY_-BCrL0AgIdYEUE28pi0AP_avTVAgwv5hgzrh75vo,717
|
|
|
6
6
|
promptlayer/track/__init__.py,sha256=VheO_Au0lffGlPKYYPQwkv8ci16wSXABCVSNRoFWu_w,945
|
|
7
7
|
promptlayer/track/track.py,sha256=XNEZT9yNiRBPp9vaDZo_f0dP_ldOu8q1qafpVfS5Ze8,1610
|
|
8
8
|
promptlayer/types/__init__.py,sha256=ulWSyCrk5hZ_PI-nKGpd6GPcRaK8lqP4wFl0LPNUYWk,61
|
|
9
|
-
promptlayer/types/prompt_template.py,sha256=
|
|
10
|
-
promptlayer/utils.py,sha256=
|
|
11
|
-
promptlayer-1.0.
|
|
12
|
-
promptlayer-1.0.
|
|
13
|
-
promptlayer-1.0.
|
|
14
|
-
promptlayer-1.0.
|
|
9
|
+
promptlayer/types/prompt_template.py,sha256=yMtQ1kMe_Ub12htwu7EC_BBqOsZosrjckc73tJgokmo,4289
|
|
10
|
+
promptlayer/utils.py,sha256=jkto4JeHdEK7eoPN50H0AjlWZHk5twzFpMmvMP-rNZU,27941
|
|
11
|
+
promptlayer-1.0.8.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
12
|
+
promptlayer-1.0.8.dist-info/METADATA,sha256=FsZTOzYib7xxM9OMJU0tmNwB-YX7atgrDaRT7PgFrJA,4506
|
|
13
|
+
promptlayer-1.0.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
14
|
+
promptlayer-1.0.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|