update to logging

This commit is contained in:
Krrish Dholakia 2023-09-02 15:45:45 -07:00
parent 9d5070a124
commit 895e3c1a94
7 changed files with 7 additions and 6 deletions

BIN
dist/litellm-0.1.517-py3-none-any.whl vendored Normal file

Binary file not shown.

BIN
dist/litellm-0.1.517.tar.gz vendored Normal file

Binary file not shown.

View file

@ -158,7 +158,7 @@ def completion(
model_alias_map=litellm.model_alias_map, model_alias_map=litellm.model_alias_map,
completion_call_id=id completion_call_id=id
) )
logging.update_environment_variables(optional_params=optional_params, litellm_params=litellm_params) logging.update_environment_variables(model=model, optional_params=optional_params, litellm_params=litellm_params)
if custom_llm_provider == "azure": if custom_llm_provider == "azure":
# azure configs # azure configs
openai.api_type = "azure" openai.api_type = "azure"

View file

@ -169,8 +169,9 @@ class Logging:
self.litellm_call_id = litellm_call_id self.litellm_call_id = litellm_call_id
self.function_id = function_id self.function_id = function_id
def update_environment_variables(self, optional_params, litellm_params): def update_environment_variables(self, model, optional_params, litellm_params):
self.optional_params = optional_params self.optional_params = optional_params
self.model = model
self.litellm_params = litellm_params self.litellm_params = litellm_params
self.logger_fn = litellm_params["logger_fn"] self.logger_fn = litellm_params["logger_fn"]
print_verbose(f"self.optional_params: {self.optional_params}") print_verbose(f"self.optional_params: {self.optional_params}")

8
poetry.lock generated
View file

@ -442,13 +442,13 @@ files = [
[[package]] [[package]]
name = "openai" name = "openai"
version = "0.27.9" version = "0.27.10"
description = "Python client library for the OpenAI API" description = "Python client library for the OpenAI API"
optional = false optional = false
python-versions = ">=3.7.1" python-versions = ">=3.7.1"
files = [ files = [
{file = "openai-0.27.9-py3-none-any.whl", hash = "sha256:6a3cf8e276d1a6262b50562fbc0cba7967cfebb78ed827d375986b48fdad6475"}, {file = "openai-0.27.10-py3-none-any.whl", hash = "sha256:beabd1757e3286fa166dde3b70ebb5ad8081af046876b47c14c41e203ed22a14"},
{file = "openai-0.27.9.tar.gz", hash = "sha256:b687761c82f5ebb6f61efc791b2083d2d068277b94802d4d1369efe39851813d"}, {file = "openai-0.27.10.tar.gz", hash = "sha256:60e09edf7100080283688748c6803b7b3b52d5a55d21890f3815292a0552d83b"},
] ]
[package.dependencies] [package.dependencies]
@ -781,4 +781,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.8" python-versions = "^3.8"
content-hash = "de77e77aaa3ed490ffa159387c8e70e43361d78b095a975fec950336e54758e6" content-hash = "a4d053f143a2c046e068fe709eef9512e4aa03b1bf6476ac3862abbb11538bcf"