bstraehle commited on
Commit
9c98406
1 Parent(s): 83f4876

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -121,8 +121,8 @@ def wandb_trace(rag_option, prompt, completion, status_msg, start_time_ms, end_t
121
  trace = Trace(
122
  kind = "chain",
123
  name = "LLMChain" if (rag_option == "Off") else "RetrievalQA",
124
- status_code = "SUCCESS" if (status_msg == "") else "ERROR",
125
- status_message = status_msg,
126
  metadata={
127
  "chunk_overlap": "" if (rag_option == "Off") else config["chunk_overlap"],
128
  "chunk_size": "" if (rag_option == "Off") else config["chunk_size"],
@@ -130,9 +130,9 @@ def wandb_trace(rag_option, prompt, completion, status_msg, start_time_ms, end_t
130
  "model": config["model"],
131
  "temperature": config["temperature"],
132
  },
133
- inputs = {"rag_option": rag_option if (status_msg == "") else "",
134
- "prompt": str(prompt if (status_msg == "") else ""),
135
- "prompt_template": str((llm_template if (rag_option == "Off") else rag_template) if (status_msg == "") else "")},
136
  outputs = {"completion": str(completion)},
137
  start_time_ms = start_time_ms,
138
  end_time_ms = end_time_ms
 
121
  trace = Trace(
122
  kind = "chain",
123
  name = "LLMChain" if (rag_option == "Off") else "RetrievalQA",
124
+ status_code = "SUCCESS" if (str(status_msg) == "") else "ERROR",
125
+ status_message = str(status_msg),
126
  metadata={
127
  "chunk_overlap": "" if (rag_option == "Off") else config["chunk_overlap"],
128
  "chunk_size": "" if (rag_option == "Off") else config["chunk_size"],
 
130
  "model": config["model"],
131
  "temperature": config["temperature"],
132
  },
133
+ inputs = {"rag_option": rag_option if (str(status_msg) == "") else "",
134
+ "prompt": str(prompt if (str(status_msg) == "") else ""),
135
+ "prompt_template": str((llm_template if (rag_option == "Off") else rag_template) if (str(status_msg) == "") else "")},
136
  outputs = {"completion": str(completion)},
137
  start_time_ms = start_time_ms,
138
  end_time_ms = end_time_ms