From b966baa1f0500310a8d6ee5dcd5b97d5bc14ae76 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Fri, 15 Sep 2023 15:16:58 -0700 Subject: [PATCH] undo change to always setting role to assistant --- litellm/utils.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index 19df4fbdd..4c31c774a 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -2451,7 +2451,7 @@ class CustomStreamWrapper: def __next__(self): try: - completion_obj = {"content": "", "role": "assistant"} # default to role being assistant + completion_obj = {"content": "", "role": ""} # default to role being assistant if self.model in litellm.anthropic_models: chunk = next(self.completion_stream) completion_obj["content"] = self.handle_anthropic_chunk(chunk) diff --git a/pyproject.toml b/pyproject.toml index 2822a3beb..d2f571150 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.643" +version = "0.1.644" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"