From 72a4f42f3ba743979a1268c84178e15ce8d607d8 Mon Sep 17 00:00:00 2001 From: Narendranath Gogineni Date: Tue, 23 Jul 2024 11:56:22 +0530 Subject: [PATCH] fix: Allow token_logprobs and top_logprobs List to have Objects of None type --- portkey_ai/api_resources/types/complete_type.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/portkey_ai/api_resources/types/complete_type.py b/portkey_ai/api_resources/types/complete_type.py index 39165829..3fc9f551 100644 --- a/portkey_ai/api_resources/types/complete_type.py +++ b/portkey_ai/api_resources/types/complete_type.py @@ -16,9 +16,9 @@ class CompletionUsage(BaseModel): class Logprobs(BaseModel): text_offset: Optional[List[int]] = None - token_logprobs: Optional[List[float]] = None + token_logprobs: Optional[List[Optional[float]]] = None tokens: Optional[List[str]] = None - top_logprobs: Optional[List[Dict[str, float]]] = None + top_logprobs: Optional[List[Optional[Dict[str, float]]]] = None class CompletionChoice(BaseModel):