promptlayer 1.0.44__py3-none-any.whl → 1.0.46__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/promptlayer.py +3 -1
- promptlayer/utils.py +2 -2
- {promptlayer-1.0.44.dist-info → promptlayer-1.0.46.dist-info}/METADATA +1 -1
- {promptlayer-1.0.44.dist-info → promptlayer-1.0.46.dist-info}/RECORD +7 -7
- {promptlayer-1.0.44.dist-info → promptlayer-1.0.46.dist-info}/LICENSE +0 -0
- {promptlayer-1.0.44.dist-info → promptlayer-1.0.46.dist-info}/WHEEL +0 -0
promptlayer/__init__.py
CHANGED
promptlayer/promptlayer.py
CHANGED
|
@@ -218,7 +218,7 @@ class PromptLayer(PromptLayerMixin):
|
|
|
218
218
|
"prompt_name": prompt_name,
|
|
219
219
|
"prompt_version": prompt_version,
|
|
220
220
|
"prompt_release_label": prompt_release_label,
|
|
221
|
-
"input_variables": input_variables,
|
|
221
|
+
"input_variables": input_variables or {},
|
|
222
222
|
"model_parameter_overrides": model_parameter_overrides,
|
|
223
223
|
"tags": tags,
|
|
224
224
|
"metadata": metadata,
|
|
@@ -365,6 +365,7 @@ class AsyncPromptLayer(PromptLayerMixin):
|
|
|
365
365
|
openai_module,
|
|
366
366
|
function_name="openai",
|
|
367
367
|
api_key=self.api_key,
|
|
368
|
+
tracer=self.tracer,
|
|
368
369
|
)
|
|
369
370
|
return openai
|
|
370
371
|
elif name == "anthropic":
|
|
@@ -375,6 +376,7 @@ class AsyncPromptLayer(PromptLayerMixin):
|
|
|
375
376
|
function_name="anthropic",
|
|
376
377
|
provider_type="anthropic",
|
|
377
378
|
api_key=self.api_key,
|
|
379
|
+
tracer=self.tracer,
|
|
378
380
|
)
|
|
379
381
|
return anthropic
|
|
380
382
|
else:
|
promptlayer/utils.py
CHANGED
|
@@ -1718,7 +1718,7 @@ def google_chat_request(client, **kwargs):
|
|
|
1718
1718
|
history = [Content(**item) for item in kwargs.get("history", [])]
|
|
1719
1719
|
generation_config = kwargs.get("generation_config", {})
|
|
1720
1720
|
chat = client.chats.create(model=model, history=history, config=generation_config)
|
|
1721
|
-
last_message = history[-1] if history else None
|
|
1721
|
+
last_message = history[-1].parts[0] if history else None
|
|
1722
1722
|
if stream:
|
|
1723
1723
|
return chat.send_message_stream(message=last_message)
|
|
1724
1724
|
return chat.send_message(message=last_message)
|
|
@@ -1780,7 +1780,7 @@ async def agoogle_chat_request(client, **kwargs):
|
|
|
1780
1780
|
history = [Content(**item) for item in kwargs.get("history", [])]
|
|
1781
1781
|
generation_config = kwargs.get("generation_config", {})
|
|
1782
1782
|
chat = client.aio.chats.create(model=model, history=history, config=generation_config)
|
|
1783
|
-
last_message = history[-1] if history else None
|
|
1783
|
+
last_message = history[-1].parts[0] if history else None
|
|
1784
1784
|
if stream:
|
|
1785
1785
|
return await chat.send_message_stream(message=last_message)
|
|
1786
1786
|
return await chat.send_message(message=last_message)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
promptlayer/__init__.py,sha256=
|
|
1
|
+
promptlayer/__init__.py,sha256=RpCzR7owNDhuzKvjrV8NllgdU66ONJL477AkKD0_mok,140
|
|
2
2
|
promptlayer/groups/__init__.py,sha256=xhOAolLUBkr76ZHvJr29OwjCIk1V9qKQXjZCuyTJUIY,429
|
|
3
3
|
promptlayer/groups/groups.py,sha256=YPROicy-TzpkrpA8vOpZS2lwvJ6VRtlbQ1S2oT1N0vM,338
|
|
4
|
-
promptlayer/promptlayer.py,sha256=
|
|
4
|
+
promptlayer/promptlayer.py,sha256=vLQjS7n2VmlsesJmKl2NNNms3EnY-lt3dIM0ysUozfQ,20782
|
|
5
5
|
promptlayer/promptlayer_base.py,sha256=jOgXzNZlV1LKOOsXSSAOgn8o4hXn_EV0oY9Nf3Bsu_s,6872
|
|
6
6
|
promptlayer/promptlayer_mixins.py,sha256=Plx_zRWOzHxk49Rr5jv6Yq0-mrRfgwzxeU6wS4iahLE,10897
|
|
7
7
|
promptlayer/span_exporter.py,sha256=wxJoYHsaS0zrMpYShCeHGChWI06DeNHQfeFf5ZRU498,2508
|
|
@@ -11,8 +11,8 @@ promptlayer/track/track.py,sha256=A-awcYwsSwxktrlCMchy8NITIquwxU1UXbgLZMwqrA0,31
|
|
|
11
11
|
promptlayer/types/__init__.py,sha256=xJcvQuOk91ZBBePb40-1FDNDKYrZoH5lPE2q6_UhprM,111
|
|
12
12
|
promptlayer/types/prompt_template.py,sha256=GoYSorgBmUgvtyXaGAOv0KgVC61Llzn8bND6PF1fW50,4929
|
|
13
13
|
promptlayer/types/request_log.py,sha256=xU6bcxQar6GaBOJlgZTavXUV3FjE8sF_nSjPu4Ya_00,174
|
|
14
|
-
promptlayer/utils.py,sha256=
|
|
15
|
-
promptlayer-1.0.
|
|
16
|
-
promptlayer-1.0.
|
|
17
|
-
promptlayer-1.0.
|
|
18
|
-
promptlayer-1.0.
|
|
14
|
+
promptlayer/utils.py,sha256=hXS00lO4pR3p00cC-aSzO3XqW7Y0pMMKD97oeuU62pw,62842
|
|
15
|
+
promptlayer-1.0.46.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
16
|
+
promptlayer-1.0.46.dist-info/METADATA,sha256=EKnk2sJeVmgaJIv4l1x9dIth4lTTKtakB26RZNYwPb4,4855
|
|
17
|
+
promptlayer-1.0.46.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
18
|
+
promptlayer-1.0.46.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|