From 4bf1949ea054f1d5db06df0f49a48f3da38da7db Mon Sep 17 00:00:00 2001 From: csgulati09 Date: Wed, 31 Jul 2024 15:33:29 +0530 Subject: [PATCH] fix: linting issues --- portkey_ai/api_resources/client.py | 6 ++++-- portkey_ai/api_resources/types/chat_complete_type.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/portkey_ai/api_resources/client.py b/portkey_ai/api_resources/client.py index a290b40..09621fa 100644 --- a/portkey_ai/api_resources/client.py +++ b/portkey_ai/api_resources/client.py @@ -182,7 +182,8 @@ def copy( cache_namespace=cache_namespace or self.cache_namespace, http_client=http_client or self._client, request_timeout=request_timeout or self.request_timeout, - strict_open_ai_compliance=strict_open_ai_compliance or self.strict_open_ai_compliance, + strict_open_ai_compliance=strict_open_ai_compliance + or self.strict_open_ai_compliance, **self.kwargs, **kwargs, ) @@ -363,7 +364,8 @@ def copy( cache_namespace=cache_namespace or self.cache_namespace, http_client=http_client or self._client, request_timeout=request_timeout or self.request_timeout, - strict_open_ai_compliance=strict_open_ai_compliance or self.strict_open_ai_compliance, + strict_open_ai_compliance=strict_open_ai_compliance + or self.strict_open_ai_compliance, **self.kwargs, **kwargs, ) diff --git a/portkey_ai/api_resources/types/chat_complete_type.py b/portkey_ai/api_resources/types/chat_complete_type.py index e2dcbef..0291bfb 100644 --- a/portkey_ai/api_resources/types/chat_complete_type.py +++ b/portkey_ai/api_resources/types/chat_complete_type.py @@ -96,14 +96,14 @@ class ChoiceLogprobs(BaseModel, extra="allow"): content: Optional[List[ChatCompletionTokenLogprob]] = None -class Choice(BaseModel, extra = "allow"): +class Choice(BaseModel, extra="allow"): finish_reason: Optional[str] index: Optional[int] logprobs: Optional[ChoiceLogprobs] = None message: Optional[ChatCompletionMessage] -class ChatCompletions(BaseModel, extra = "allow"): +class ChatCompletions(BaseModel, extra="allow"): id: Optional[str] choices: Optional[List[Choice]] created: Optional[int]