From b79e21a81a3267d72aea90b1f08f8d294a3d529c Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 18 Jun 2024 20:18:29 -0700 Subject: [PATCH] fix(types/utils.py): fix linting errors --- litellm/types/utils.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/litellm/types/utils.py b/litellm/types/utils.py index a541dbb90..c21244a5f 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -1,22 +1,13 @@ import json import time import uuid -import json -import time -import uuid from enum import Enum from typing import Dict, List, Literal, Optional, Tuple, Union -from typing import Dict, List, Literal, Optional, Tuple, Union - from openai._models import BaseModel as OpenAIObject from pydantic import ConfigDict from typing_extensions import Dict, Required, TypedDict, override -from ..litellm_core_utils.core_helpers import map_finish_reason -from .llms.openai import ChatCompletionToolCallChunk, ChatCompletionUsageBlock -from typing_extensions import Dict, Required, TypedDict, override - from ..litellm_core_utils.core_helpers import map_finish_reason from .llms.openai import ChatCompletionToolCallChunk, ChatCompletionUsageBlock @@ -548,9 +539,9 @@ class ModelResponse(OpenAIObject): new_choices = [] for choice in choices: if isinstance(choice, Choices): - _new_choice = choice + _new_choice = choice # type: ignore elif isinstance(choice, dict): - _new_choice = Choices(**choice) + _new_choice = Choices(**choice) # type: ignore new_choices.append(_new_choice) choices = new_choices else: