Update app.py
Browse files
app.py
CHANGED
@@ -123,17 +123,17 @@ def wandb_trace(rag_option, prompt, prompt_template, result, completion, chain_n
|
|
123 |
status_code = "SUCCESS" if (str(status_msg) == "") else "ERROR",
|
124 |
status_message = str(status_msg),
|
125 |
metadata={
|
126 |
-
"chunk_overlap":
|
127 |
-
"chunk_size":
|
128 |
-
"k":
|
129 |
"model": config["model"],
|
130 |
"temperature": config["temperature"],
|
131 |
},
|
132 |
start_time_ms = start_time_ms,
|
133 |
end_time_ms = end_time_ms,
|
134 |
-
inputs = {"rag_option": rag_option, "prompt": prompt, "prompt_template": prompt_template},
|
135 |
outputs = {"result": str(result), "completion": str(completion)},
|
136 |
-
model_dict = {"api_type": "openai"
|
137 |
)
|
138 |
trace.log("test")
|
139 |
wandb.finish()
|
|
|
123 |
status_code = "SUCCESS" if (str(status_msg) == "") else "ERROR",
|
124 |
status_message = str(status_msg),
|
125 |
metadata={
|
126 |
+
"chunk_overlap": "" if (rag_option == "Off") else config["chunk_overlap"],
|
127 |
+
"chunk_size": "" if (rag_option == "Off") else config["chunk_size"],
|
128 |
+
"k": "" if (rag_option == "Off") else config["k"],
|
129 |
"model": config["model"],
|
130 |
"temperature": config["temperature"],
|
131 |
},
|
132 |
start_time_ms = start_time_ms,
|
133 |
end_time_ms = end_time_ms,
|
134 |
+
inputs = {"rag_option": rag_option, "prompt": str(prompt), "prompt_template": str(prompt_template)},
|
135 |
outputs = {"result": str(result), "completion": str(completion)},
|
136 |
+
model_dict = {"api_type": "openai"}
|
137 |
)
|
138 |
trace.log("test")
|
139 |
wandb.finish()
|