diff --git a/promptic.py b/promptic.py index ff20aaa..801fff1 100644 --- a/promptic.py +++ b/promptic.py @@ -15,7 +15,7 @@ from pydantic import BaseModel from litellm.utils import CustomStreamWrapper -__version__ = "4.1.1" +__version__ = "4.1.2" SystemPrompt = Optional[Union[str, List[str], List[Dict[str, str]]]] @@ -171,7 +171,7 @@ def message(self, message: str, **kwargs): messages = [{"content": message, "role": "user"}] response = self._completion(messages, **kwargs) - if "stream" in self.litellm_kwargs | kwargs: + if (self.litellm_kwargs | kwargs).get("stream"): return self._stream_response(response) else: content = response.choices[0].message.content