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" ]