mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(logging): restore request_tags and tighten system_prompt typing
This commit is contained in:
parent
acb5ebd34b
commit
76146880dc
2 changed files with 7 additions and 6 deletions
|
|
@ -4716,12 +4716,12 @@ class StandardLoggingPayloadSetup:
|
|||
if kwargs is None:
|
||||
return None
|
||||
|
||||
if kwargs.get("system_instructions") is not None:
|
||||
return kwargs.get("system_instructions")
|
||||
if kwargs.get("instructions") is not None:
|
||||
return kwargs.get("instructions")
|
||||
if kwargs.get("system") is not None:
|
||||
return kwargs.get("system")
|
||||
for key in ("system_instructions", "instructions", "system"):
|
||||
value = kwargs.get(key)
|
||||
if value is None:
|
||||
continue
|
||||
if isinstance(value, (str, list, dict)):
|
||||
return value
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
|
|
@ -3155,6 +3155,7 @@ class StandardLoggingPayload(TypedDict):
|
|||
cache_hit: bool | None
|
||||
cache_key: str | None
|
||||
saved_cache_cost: float
|
||||
request_tags: list
|
||||
end_user: str | None
|
||||
requester_ip_address: str | None
|
||||
user_agent: str | None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue