code: def price_calculator(self, model, response_obj, start_time, end_time):
      # try and find if the model is in the model_cost map
      # else default to the average of the costs
      prompt_tokens_cost_usd_dollar = 0
      completion_tokens_cost_usd_dollar = 0
      if model in model_cost:
          prompt_tokens_cost_usd_dollar = (
              model_cost[model]["input_cost_per_token"]
              * response_obj["usage"]["prompt_tokens"]
          )
          completion_tokens_cost_usd_dollar = (
              model_cost[model]["output_cost_per_token"]
              * response_obj["usage"]["completion_tokens"]
          )
      elif "replicate" in model:
          # replicate models are charged based on time
          # llama 2 runs on an nvidia a100 which costs $0.0032 per second - https://replicate.com/replicate/llama-2-70b-chat
          model_run_time = (
              end_time - start_time
          )  # assuming time in seconds
          cost_usd_dollar = model_run_time * 0.0032
          prompt_tokens_cost_usd_dollar = cost_usd_dollar / 2
          completion_tokens_cost_usd_dollar = cost_usd_dollar / 2
      else:
          # calculate average input cost
          input_cost_sum = 0
          output_cost_sum = 0
          for model in model_cost:
              input_cost_sum += model_cost[model][
                  "input_cost_per_token"
              ]
              output_cost_sum += model_cost[model][
                  "output_cost_per_token"
              ]
          avg_input_cost = input_cost_sum / len(model_cost.keys())
          avg_output_cost = output_cost_sum / len(model_cost.keys())
          prompt_tokens_cost_usd_dollar = (
              model_cost[model]["input_cost_per_token"]
              * response_obj["usage"]["prompt_tokens"]
          )
          completion_tokens_cost_usd_dollar = (
              model_cost[model]["output_cost_per_token"]
              * response_obj["usage"]["completion_tokens"]
          )
      return (
          prompt_tokens_cost_usd_dollar,
          completion_tokens_cost_usd_dollar,
      )
  
file_path: litellm/litellm/integrations/aispend.py
imports: import dotenv, os
  import requests
  import traceback
  import datetime
label_desc: Use image node_id 2 for calling the AISpendLogger obj's underlying member method code with example usage: obj.price_calculator(model, response_obj, start_time, end_time) and returns: prompt_tokens_cost_usd_dollar,  completion_tokens_cost_usd_dollar