bstraehle commited on
Commit
dadebb4
1 Parent(s): 4c3e605

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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": config["chunk_overlap"] if (rag_option != "Off") else "",
127
- "chunk_size": config["chunk_size"] if (rag_option != "Off") else "",
128
- "k": config["k"] if (rag_option != "Off") else "N/A",
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", "model_alias": "gpt-4"}
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()