promptlayer 1.0.45__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 CHANGED
@@ -1,4 +1,4 @@
1
1
  from .promptlayer import AsyncPromptLayer, PromptLayer
2
2
 
3
- __version__ = "1.0.45"
3
+ __version__ = "1.0.46"
4
4
  __all__ = ["PromptLayer", "AsyncPromptLayer", "__version__"]
@@ -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,
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,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: promptlayer
3
- Version: 1.0.45
3
+ Version: 1.0.46
4
4
  Summary: PromptLayer is a platform for prompt engineering and tracks your LLM requests.
5
5
  License: Apache-2.0
6
6
  Author: Magniv
@@ -1,7 +1,7 @@
1
- promptlayer/__init__.py,sha256=lF0AT1-uoLyJOLux4SRaLhkoajT2xSDNpe057cQahMA,140
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=j-2quL72MG0N5XzG55ZD8BD1zckVZROx5W8RYI4Y33Y,20776
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=ojLyY0sQ8aVm2w1YRis3gQyKvdpnpMVD_wytnP6Dj8I,62824
15
- promptlayer-1.0.45.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
- promptlayer-1.0.45.dist-info/METADATA,sha256=JYUScUnsix7vjwDzV3zWEbiBoOZYqk7NnIOGSj5a0yU,4855
17
- promptlayer-1.0.45.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
18
- promptlayer-1.0.45.dist-info/RECORD,,
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,,