fix: fix linting errors

This commit is contained in:
Krrish Dholakia 2024-07-11 13:44:29 -07:00
parent 389a51e05d
commit 77068575d7
2 changed files with 2 additions and 2 deletions

View file

@ -128,7 +128,7 @@ def process_response(
message=message_obj, message=message_obj,
) )
choices_list.append(choice_obj) choices_list.append(choice_obj)
model_response.choices = choices_list model_response.choices = choices_list # type: ignore
except Exception as e: except Exception as e:
raise ClarifaiError( raise ClarifaiError(

View file

@ -388,7 +388,7 @@ def process_response(
## Building RESPONSE OBJECT ## Building RESPONSE OBJECT
if len(result) > 1: if len(result) > 1:
model_response.choices[0].message.content = result # type :ignore model_response.choices[0].message.content = result # type: ignore
# Calculate usage # Calculate usage
prompt_tokens = len(encoding.encode(prompt, disallowed_special=())) prompt_tokens = len(encoding.encode(prompt, disallowed_special=()))