Update trace.py
Browse files
trace.py
CHANGED
@@ -18,16 +18,16 @@ def trace_wandb(config,
|
|
18 |
trace = Trace(
|
19 |
kind = "LLM",
|
20 |
name = "Context-Aware Reasoning Application",
|
21 |
-
status_code = "success" if (
|
22 |
-
status_message =
|
23 |
-
inputs = {"prompt":
|
24 |
-
"rag_option":
|
25 |
-
"config":
|
26 |
-
} if (
|
27 |
-
outputs = {"result":
|
28 |
-
"callback":
|
29 |
-
"completion":
|
30 |
-
} if (
|
31 |
start_time_ms = start_time_ms,
|
32 |
end_time_ms = end_time_ms
|
33 |
)
|
|
|
18 |
trace = Trace(
|
19 |
kind = "LLM",
|
20 |
name = "Context-Aware Reasoning Application",
|
21 |
+
status_code = "success" if (err_msg == "") else "error",
|
22 |
+
status_message = err_msg,
|
23 |
+
inputs = {"prompt": prompt,
|
24 |
+
"rag_option": rag_option,
|
25 |
+
"config": config
|
26 |
+
} if (err_msg == "") else {},
|
27 |
+
outputs = {"result": result,
|
28 |
+
"callback": callback,
|
29 |
+
"completion": completion
|
30 |
+
} if (err_msg == "") else {},
|
31 |
start_time_ms = start_time_ms,
|
32 |
end_time_ms = end_time_ms
|
33 |
)
|