Update app.py
Browse files
app.py
CHANGED
@@ -118,12 +118,12 @@ def rag_chain(llm, prompt, db):
|
|
118 |
def wandb_trace(rag_option, prompt, completion, chain, status_msg, start_time_ms, end_time_ms):
|
119 |
if (chain != None):
|
120 |
if (type(chain).__name__ == "LLMChain"):
|
121 |
-
print("1=" + chain.llm)
|
122 |
-
print("2=" + chain.prompt)
|
123 |
if (type(chain).__name__ == "RetrievalQA"):
|
124 |
-
print("3=" + chain.llm)
|
125 |
-
print("4=" + chain.chain_type_kwargs)
|
126 |
-
print("5=" + chain.retriever)
|
127 |
wandb.init(project = "openai-llm-rag")
|
128 |
if (rag_option == "Off" or str(status_msg) != ""):
|
129 |
result = completion
|
|
|
118 |
def wandb_trace(rag_option, prompt, completion, chain, status_msg, start_time_ms, end_time_ms):
|
119 |
if (chain != None):
|
120 |
if (type(chain).__name__ == "LLMChain"):
|
121 |
+
print("1=" + str(chain.llm))
|
122 |
+
print("2=" + str(chain.prompt))
|
123 |
if (type(chain).__name__ == "RetrievalQA"):
|
124 |
+
print("3=" + str(chain.llm))
|
125 |
+
print("4=" + str(chain.chain_type_kwargs))
|
126 |
+
print("5=" + str(chain.retriever))
|
127 |
wandb.init(project = "openai-llm-rag")
|
128 |
if (rag_option == "Off" or str(status_msg) != ""):
|
129 |
result = completion
|