Skip to content

Commit

Permalink
fixing routes for non-cached responses
Browse files Browse the repository at this point in the history
  • Loading branch information
prateeksachan committed Jan 3, 2025
1 parent e294299 commit b43e91f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bolna/agent_manager/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,13 @@ def __init__(self, assistant_name, task_id, task, ws, input_parameters=None, con

if self.routes:
start_time = time.time()
routes_meta = self.kwargs.get('routes', None)
if self.__is_multiagent():
routes_meta = self.kwargs.get('routes', None)
routes_meta = routes_meta['routes']
else:
routes_meta = self.kwargs.get('routes', None)

if self.kwargs['routes']:
if routes_meta:
self.vector_caches = routes_meta["vector_caches"]
self.route_responses_dict = routes_meta["route_responses_dict"]
self.route_layer = routes_meta["route_layer"]
Expand Down Expand Up @@ -1239,7 +1238,7 @@ async def _process_conversation_task(self, message, sequence, meta_info):
cache_response = self.route_responses_dict[route]

logger.info(f"Cached response {cache_response}")
meta_info['cached'] = True
meta_info['cached'] = False
meta_info["end_of_llm_stream"] = True

await self._handle_llm_output(next_step, cache_response, should_bypass_synth, meta_info)
Expand Down

0 comments on commit b43e91f

Please sign in to comment.