From a09a6f24a4ce185d89cda236e5cbbebf00dac1e4 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Fri, 15 Dec 2023 10:39:23 -0800 Subject: [PATCH] fix(together_ai.py): additional logging for together ai encoding prompt --- litellm/llms/together_ai.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/llms/together_ai.py b/litellm/llms/together_ai.py index 210ed497e..b4964cef4 100644 --- a/litellm/llms/together_ai.py +++ b/litellm/llms/together_ai.py @@ -177,6 +177,7 @@ def completion( model_response["choices"][0]["message"]["content"] = completion_response["output"]["choices"][0]["text"] ## CALCULATING USAGE + print_verbose(f"CALCULATING TOGETHERAI TOKEN USAGE. Model Response: {model_response}; model_response['choices'][0]['message'].get('content', ''): {model_response['choices'][0]['message'].get('content', None)}") prompt_tokens = len(encoding.encode(prompt)) completion_tokens = len( encoding.encode(model_response["choices"][0]["message"].get("content", ""))