From 4dd1913da1e5ba402b12b294573f8f10c0fb7d75 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 6 Nov 2023 06:44:15 -0800 Subject: [PATCH] =?UTF-8?q?bump:=20version=200.13.3.dev1=20=E2=86=92=200.1?= =?UTF-8?q?3.3.dev2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litellm/tests/test_langfuse.py | 4 ++-- litellm/utils.py | 7 ++++++- pyproject.toml | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/litellm/tests/test_langfuse.py b/litellm/tests/test_langfuse.py index edab20a38..a8ad8afd6 100644 --- a/litellm/tests/test_langfuse.py +++ b/litellm/tests/test_langfuse.py @@ -14,9 +14,9 @@ import time def test_langfuse_logging_async(): async def _test_langfuse(): - await litellm.acompletion( + return await litellm.acompletion( model="gpt-3.5-turbo", - prompt="This is a test", + messages=[{"role": "user", "content":"This is a test"}], max_tokens=1000, temperature=0.7, ) diff --git a/litellm/utils.py b/litellm/utils.py index 8b2d10207..35c4b1594 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -828,7 +828,12 @@ def client(original_function): model = args[0] if len(args) > 0 else kwargs["model"] call_type = original_function.__name__ if call_type == CallTypes.completion.value: - messages = args[1] if len(args) > 1 else kwargs["messages"] + if len(args) > 1: + messages = args[1] + elif kwargs.get("messages", None): + messages = kwargs["messages"] + elif kwargs.get("prompt", None): + messages = kwargs["prompt"] elif call_type == CallTypes.embedding.value: messages = args[1] if len(args) > 1 else kwargs["input"] stream = True if "stream" in kwargs and kwargs["stream"] == True else False diff --git a/pyproject.toml b/pyproject.toml index 4fb2e0bd1..350b5efed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.13.3.dev1" +version = "0.13.3.dev2" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License" @@ -26,7 +26,7 @@ requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "0.13.3.dev1" +version = "0.13.3.dev2" version_files = [ "pyproject.toml:^version" ]