promptlayer 1.0.33__tar.gz → 1.0.35__tar.gz

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.

@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: promptlayer
3
- Version: 1.0.33
3
+ Version: 1.0.35
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,4 +1,4 @@
1
1
  from .promptlayer import AsyncPromptLayer, PromptLayer
2
2
 
3
- __version__ = "1.0.33"
3
+ __version__ = "1.0.35"
4
4
  __all__ = ["PromptLayer", "AsyncPromptLayer", "__version__"]
@@ -117,6 +117,13 @@ class PlaceholderMessage(TypedDict, total=False):
117
117
  name: str
118
118
 
119
119
 
120
+ class DeveloperMessage(TypedDict, total=False):
121
+ role: Literal["developer"]
122
+ input_variables: List[str]
123
+ template_format: TemplateFormat
124
+ content: Sequence[Content]
125
+
126
+
120
127
  class ChatFunctionCall(TypedDict, total=False):
121
128
  name: str
122
129
 
@@ -135,6 +142,7 @@ Message = Union[
135
142
  FunctionMessage,
136
143
  ToolMessage,
137
144
  PlaceholderMessage,
145
+ DeveloperMessage,
138
146
  ]
139
147
 
140
148
 
@@ -1642,9 +1642,10 @@ def mistral_request(
1642
1642
 
1643
1643
  client = Mistral(api_key=os.environ.get("MISTRAL_API_KEY"))
1644
1644
  if "stream" in kwargs and kwargs["stream"]:
1645
- cleaned_kwargs = kwargs.copy()
1646
- cleaned_kwargs.pop("stream")
1647
- return client.chat.stream(**cleaned_kwargs)
1645
+ kwargs.pop("stream")
1646
+ return client.chat.stream(**kwargs)
1647
+ if "stream" in kwargs:
1648
+ kwargs.pop("stream")
1648
1649
  return client.chat.complete(**kwargs)
1649
1650
 
1650
1651
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "promptlayer"
3
- version = "1.0.33"
3
+ version = "1.0.35"
4
4
  description = "PromptLayer is a platform for prompt engineering and tracks your LLM requests."
5
5
  authors = ["Magniv <hello@magniv.io>"]
6
6
  license = "Apache-2.0"
File without changes
File without changes