Update app.py
Browse files
app.py
CHANGED
@@ -129,18 +129,20 @@ def wandb_trace(rag_option, prompt, completion, result, chain, err_msg, start_ti
|
|
129 |
metadata = {
|
130 |
"chunk_overlap": "" if (rag_option == RAG_OFF) else config["chunk_overlap"],
|
131 |
"chunk_size": "" if (rag_option == RAG_OFF) else config["chunk_size"],
|
132 |
-
"k": "" if (rag_option == RAG_OFF) else config["k"],
|
133 |
-
"model_name": config["model_name"],
|
134 |
-
"temperature": config["temperature"],
|
135 |
},
|
136 |
inputs = {"rag_option": rag_option if (str(err_msg) == "") else "",
|
137 |
-
"prompt": str(prompt if (str(err_msg) == "") else "")
|
138 |
-
|
139 |
outputs = {"result": result if (str(err_msg) == "") else "",
|
140 |
-
"completion": str(completion)
|
141 |
-
|
142 |
-
|
143 |
-
"
|
|
|
|
|
144 |
start_time_ms = start_time_ms,
|
145 |
end_time_ms = end_time_ms
|
146 |
)
|
|
|
129 |
metadata = {
|
130 |
"chunk_overlap": "" if (rag_option == RAG_OFF) else config["chunk_overlap"],
|
131 |
"chunk_size": "" if (rag_option == RAG_OFF) else config["chunk_size"],
|
132 |
+
#"k": "" if (rag_option == RAG_OFF) else config["k"],
|
133 |
+
#"model_name": config["model_name"],
|
134 |
+
#"temperature": config["temperature"],
|
135 |
},
|
136 |
inputs = {"rag_option": rag_option if (str(err_msg) == "") else "",
|
137 |
+
"prompt": str(prompt if (str(err_msg) == "") else ""),
|
138 |
+
},
|
139 |
outputs = {"result": result if (str(err_msg) == "") else "",
|
140 |
+
"completion": str(completion),
|
141 |
+
},
|
142 |
+
model_dict = {"llm_client": str(chain.llm.client) if (rag_option == RAG_OFF) else str(chain.combine_documents_chain.llm_chain.llm.client),
|
143 |
+
"chain_prompt": str(chain.prompt) if (rag_option == RAG_OFF) else str(chain.combine_documents_chain.llm_chain.prompt),
|
144 |
+
"retriever": "" if (rag_option == RAG_OFF) else chain.retriever,
|
145 |
+
},
|
146 |
start_time_ms = start_time_ms,
|
147 |
end_time_ms = end_time_ms
|
148 |
)
|