diff --git a/pandasai/helpers/openai_info.py b/pandasai/helpers/openai_info.py index 66cb1cfed..581f6a97f 100644 --- a/pandasai/helpers/openai_info.py +++ b/pandasai/helpers/openai_info.py @@ -102,7 +102,9 @@ def __call__(self, response: OpenAIObject) -> None: model_name = response.model if model_name in MODEL_COST_PER_1K_TOKENS: - prompt_cost = get_openai_token_cost_for_model(model_name, usage.prompt_tokens) + prompt_cost = get_openai_token_cost_for_model( + model_name, usage.prompt_tokens + ) completion_cost = get_openai_token_cost_for_model( model_name, usage.completion_tokens, is_completion=True )