Adrian Cowham commited on
Commit
c58b4cd
1 Parent(s): f3e6f47

removed top level query aggregator

Browse files
Files changed (1) hide show
  1. src/recursive_inference.py +4 -8
src/recursive_inference.py CHANGED
@@ -85,7 +85,7 @@ def main():
85
  # define query engines
86
  vector_query_engine = vector_index.as_query_engine(
87
  similarity_top_k=2,
88
- verbose=True
89
  )
90
  agents[title] = vector_query_engine
91
  print(f"Agents: {len(agents)}")
@@ -100,10 +100,8 @@ def main():
100
  verbose=True,
101
  query_response_tmpl="{response}"
102
  )
103
-
104
- # recursive_retriever.retrieve
105
  # response_synthesizer = get_response_synthesizer(
106
- # response_mode="simple_summarize",
107
  # )
108
  # query_engine = RetrieverQueryEngine.from_args(
109
  # recursive_retriever,
@@ -121,10 +119,8 @@ def main():
121
  if user_input == 'exit':
122
  break
123
  else:
124
- response = recursive_retriever.retrieve(user_input)[0]
125
- # response = query_engine.query(user_input)
126
- print(response.get_text())
127
- print(response.get_content())
128
 
129
  except Exception as e:
130
  # Handle exceptions
 
85
  # define query engines
86
  vector_query_engine = vector_index.as_query_engine(
87
  similarity_top_k=2,
88
+ verbose=True,
89
  )
90
  agents[title] = vector_query_engine
91
  print(f"Agents: {len(agents)}")
 
100
  verbose=True,
101
  query_response_tmpl="{response}"
102
  )
 
 
103
  # response_synthesizer = get_response_synthesizer(
104
+ # response_mode="compact_accumulate",
105
  # )
106
  # query_engine = RetrieverQueryEngine.from_args(
107
  # recursive_retriever,
 
119
  if user_input == 'exit':
120
  break
121
  else:
122
+ response = recursive_retriever.retrieve(user_input)
123
+ print(response[0].get_text())
 
 
124
 
125
  except Exception as e:
126
  # Handle exceptions