mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
fix setting StandardLoggingMetadata
This commit is contained in:
parent
fb523b79e9
commit
9b87e4ea52
1 changed files with 3 additions and 7 deletions
|
|
@ -2867,13 +2867,9 @@ def get_standard_logging_metadata(
|
|||
)
|
||||
if isinstance(metadata, dict):
|
||||
# Filter the metadata dictionary to include only the specified keys
|
||||
clean_metadata = StandardLoggingMetadata(
|
||||
**{ # type: ignore
|
||||
key: metadata[key]
|
||||
for key in StandardLoggingMetadata.__annotations__.keys()
|
||||
if key in metadata
|
||||
}
|
||||
)
|
||||
for k, v in metadata.items():
|
||||
if k in StandardLoggingMetadata.__annotations__.keys():
|
||||
clean_metadata[k] = v
|
||||
|
||||
if metadata.get("user_api_key") is not None:
|
||||
if is_valid_sha256_hash(str(metadata.get("user_api_key"))):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue