bstraehle commited on
Commit
511bcdc
·
1 Parent(s): 315505c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
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
- #"prompt_template": str((llm_template if (rag_option == RAG_OFF) else rag_template) if (str(err_msg) == "") else "")},
139
  outputs = {"result": result if (str(err_msg) == "") else "",
140
- "completion": str(completion)},
141
- model_dict = {"llm_client": chain.llm.client if (rag_option == RAG_OFF) else chain.combine_documents_chain.llm_chain.llm.client,
142
- "prompt_engineered": chain.prompt if (rag_option == RAG_OFF) else chain.combine_documents_chain.llm_chain.prompt,
143
- "retriever": "" if (rag_option == RAG_OFF) else chain.retriever},
 
 
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
  )