mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
Merge pull request #1646 from BerriAI/litellm_image_gen_cost_tracking_proxy
Litellm image gen cost tracking proxy
This commit is contained in:
commit
ba4089824d
4 changed files with 60 additions and 43 deletions
|
@ -2030,14 +2030,15 @@ def client(original_function):
|
|||
start_time=start_time,
|
||||
)
|
||||
## check if metadata is passed in
|
||||
litellm_params = {}
|
||||
if "metadata" in kwargs:
|
||||
litellm_params = {"metadata": kwargs["metadata"]}
|
||||
logging_obj.update_environment_variables(
|
||||
model=model,
|
||||
user="",
|
||||
optional_params={},
|
||||
litellm_params=litellm_params,
|
||||
)
|
||||
litellm_params["metadata"] = kwargs["metadata"]
|
||||
logging_obj.update_environment_variables(
|
||||
model=model,
|
||||
user="",
|
||||
optional_params={},
|
||||
litellm_params=litellm_params,
|
||||
)
|
||||
return logging_obj
|
||||
except Exception as e:
|
||||
import logging
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue