Daniel Foley commited on
Commit
ca4996e
·
1 Parent(s): 30a4d62

updated monitoring

Browse files
Files changed (1) hide show
  1. RAG.py +3 -2
RAG.py CHANGED
@@ -151,7 +151,7 @@ def RAG(llm: Any, query: str,vectorstore:PineconeVectorStore, top: int = 10, k:
151
  # query_prompt = query_template.invoke({"query":query})
152
  # query_response = llm.invoke(query_prompt)
153
  # new_query = parse_xml_and_query(query=query,xml_string=query_response.content)
154
- logging.info(f"---\nQUERY: {query}\n---")
155
 
156
  retrieved, _ = retrieve(query=query, vectorstore=vectorstore, k=k)
157
  if not retrieved:
@@ -196,7 +196,8 @@ def RAG(llm: Any, query: str,vectorstore:PineconeVectorStore, top: int = 10, k:
196
 
197
  # Parse and return response
198
  parsed = parse_xml_and_check(response.content)
199
- logging.info(f"RAG Finished: {time.time()-start}")
 
200
  return parsed, reranked
201
 
202
  except Exception as e:
 
151
  # query_prompt = query_template.invoke({"query":query})
152
  # query_response = llm.invoke(query_prompt)
153
  # new_query = parse_xml_and_query(query=query,xml_string=query_response.content)
154
+ logging.info(f"\n---\nQUERY: {query}")
155
 
156
  retrieved, _ = retrieve(query=query, vectorstore=vectorstore, k=k)
157
  if not retrieved:
 
196
 
197
  # Parse and return response
198
  parsed = parse_xml_and_check(response.content)
199
+ logging.info(f"RESPONSE: {parsed}\nRETRIEVED: {reranked}")
200
+ logging.info(f"RAG Finished: {time.time()-start}\n---\n")
201
  return parsed, reranked
202
 
203
  except Exception as e: