edit prints for logs
Browse files
climateqa/engine/chains/retrieve_documents.py
CHANGED
@@ -104,7 +104,7 @@ async def retrieve_documents(state,config, vectorstore,reranker,llm,rerank_by_qu
|
|
104 |
question = current_question["question"]
|
105 |
index = current_question["index"]
|
106 |
|
107 |
-
|
108 |
await log_event({"question":question,"sources":sources,"index":index},"log_retriever",config)
|
109 |
|
110 |
|
|
|
104 |
question = current_question["question"]
|
105 |
index = current_question["index"]
|
106 |
|
107 |
+
print(f"Retrieve documents for question: {question}")
|
108 |
await log_event({"question":question,"sources":sources,"index":index},"log_retriever",config)
|
109 |
|
110 |
|
climateqa/engine/chains/translation.py
CHANGED
@@ -30,12 +30,11 @@ def make_translation_chain(llm):
|
|
30 |
|
31 |
|
32 |
def make_translation_node(llm):
|
33 |
-
print("---- Translate query ----")
|
34 |
-
|
35 |
-
|
36 |
translation_chain = make_translation_chain(llm)
|
37 |
|
38 |
def translate_query(state):
|
|
|
|
|
39 |
user_input = state["user_input"]
|
40 |
translation = translation_chain.invoke({"input":user_input})
|
41 |
return {"query":translation["translation"]}
|
|
|
30 |
|
31 |
|
32 |
def make_translation_node(llm):
|
|
|
|
|
|
|
33 |
translation_chain = make_translation_chain(llm)
|
34 |
|
35 |
def translate_query(state):
|
36 |
+
print("---- Translate query ----")
|
37 |
+
|
38 |
user_input = state["user_input"]
|
39 |
translation = translation_chain.invoke({"input":user_input})
|
40 |
return {"query":translation["translation"]}
|
sandbox/20241104 - CQA - StepByStep CQA.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|