MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / response_preparer

Function response_preparer

src/hyperagent/agents/plan_seeking.py:19–24  ·  view source on GitHub ↗
(self, messages)

Source from the content-addressed store, hash-verified

17):
18 terminate_condition = lambda x: x.get("content", "").find("Final Answer:") > 0 or "_run" not in x.get("content", "")
19 def response_preparer(self, messages):
20 plain_messages = [message["content"] for message in messages]
21 query = plain_messages[0].split("Query: ")[-1].strip()
22 analysis = summarizer(f"Contexts: {' '.join(plain_messages[1:-1])}. Selectively choose the right context and answer the following `{query}`. You should remain the key code snippets.")
23 analysis += plain_messages[-1].replace("Final Answer:", "")
24 return analysis
25
26 navigator_assistant = AssistantAgent(
27 "Inner-Navigator-Assistant",

Callers

nothing calls this directly

Calls 2

extract_patchFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected