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 (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 |
)
|
|
|
18 |
trace = Trace(
|
19 |
kind = "LLM",
|
20 |
name = "Context-Aware Reasoning Application",
|
21 |
+
status_code = "success" if (str(err_msg) == "") else "error",
|
22 |
+
status_message = str(err_msg),
|
23 |
inputs = {"prompt": prompt,
|
24 |
"rag_option": rag_option,
|
25 |
+
"config": str(config)
|
26 |
+
} if (str(err_msg) == "") else {},
|
27 |
+
outputs = {"result": str(result),
|
28 |
+
"callback": str(callback),
|
29 |
+
"completion": str(completion)
|
30 |
+
} if (str(err_msg) == "") else {},
|
31 |
start_time_ms = start_time_ms,
|
32 |
end_time_ms = end_time_ms
|
33 |
)
|