From 66bfd70253b753066fd016a9c16c22c0e6310b39 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 31 Aug 2023 12:54:34 -0700 Subject: [PATCH] add completion call id --- litellm/main.py | 2 ++ litellm/utils.py | 2 ++ pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/litellm/main.py b/litellm/main.py index 3b0bbc645..1b9b7ca15 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -94,6 +94,7 @@ def completion( custom_api_base=None, litellm_call_id=None, litellm_logging_obj=None, + completion_call_id=None, # this is an optional param to tag individual completion calls # model specific optional params # used by text-bison only top_k=40, @@ -153,6 +154,7 @@ def completion( custom_api_base=custom_api_base, litellm_call_id=litellm_call_id, model_alias_map=litellm.model_alias_map, + completion_call_id=completion_call_id ) logging.update_environment_variables(optional_params=optional_params, litellm_params=litellm_params) if custom_llm_provider == "azure": diff --git a/litellm/utils.py b/litellm/utils.py index bef06c68d..def92ec09 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -646,6 +646,7 @@ def get_litellm_params( custom_api_base=None, litellm_call_id=None, model_alias_map=None, + completion_call_id=None ): litellm_params = { "return_async": return_async, @@ -657,6 +658,7 @@ def get_litellm_params( "custom_api_base": custom_api_base, "litellm_call_id": litellm_call_id, "model_alias_map": model_alias_map, + "completion_call_id": completion_call_id, "stream_response": {} # litellm_call_id: ModelResponse Dict } diff --git a/pyproject.toml b/pyproject.toml index 4f9e5986b..eb5c9be7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.510" +version = "0.1.511" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"