From 69efc4dcddee9ff87961b10953a9e7598563a46e Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 1 Aug 2024 17:32:22 -0700 Subject: [PATCH] fix(litellm_logging.py): fix linting erros --- litellm/litellm_core_utils/litellm_logging.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index 5ade61ca4..868c4a7c2 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -10,7 +10,7 @@ import sys import time import traceback import uuid -from typing import Any, Callable, Dict, List, Literal, Optional +from typing import Any, Callable, Dict, List, Literal, Optional, Union from pydantic import BaseModel @@ -505,7 +505,17 @@ class Logging: ) ) - def _response_cost_calculator(self, result: BaseModel): + def _response_cost_calculator( + self, + result: Union[ + ModelResponse, + EmbeddingResponse, + ImageResponse, + TranscriptionResponse, + TextCompletionResponse, + HttpxBinaryResponseContent, + ], + ): """ Calculate response cost using result + logging object variables.