mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
Add null check to parent_observation_id assignment
This commit is contained in:
parent
b89b3d8c44
commit
82391d270c
1 changed files with 4 additions and 1 deletions
|
|
@ -470,7 +470,6 @@ class LangFuseLogger:
|
|||
generation_params = {
|
||||
"name": generation_name,
|
||||
"id": clean_metadata.pop("generation_id", generation_id),
|
||||
"parent_observation_id": metadata.get("parent_observation_id"),
|
||||
"start_time": start_time,
|
||||
"end_time": end_time,
|
||||
"model": kwargs["model"],
|
||||
|
|
@ -483,6 +482,10 @@ class LangFuseLogger:
|
|||
"version": clean_metadata.pop("version", None),
|
||||
}
|
||||
|
||||
parent_observation_id = metadata.get("parent_observation_id", None)
|
||||
if parent_observation_id is not None:
|
||||
generation_params["parent_observation_id"] = parent_observation_id
|
||||
|
||||
if supports_prompt:
|
||||
user_prompt = clean_metadata.pop("prompt", None)
|
||||
if user_prompt is None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue