MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / _execute

Method _execute

KVCOMM/agents/copy_machine.py:118–135  ·  view source on GitHub ↗

To be overriden by the descendant class

(self, input:Dict[str,str],  spatial_info:Dict[str,Dict], temporal_info:Dict[str,Dict],**kwargs)

Source from the content-addressed store, hash-verified

116 return {"system_prompt": system_prompt, "user_prompt": user_prompt}
117
118 def _execute(self, input:Dict[str,str], spatial_info:Dict[str,Dict], temporal_info:Dict[str,Dict],**kwargs):
119 """ To be overriden by the descendant class """
120 """ Use the processed input to get the result """
121
122 inputs = asyncio.run(
123 self._process_inputs(
124 input,
125 spatial_info,
126 temporal_info,
127 mode="default",
128 **kwargs,
129 )
130 )
131 system_prompt = inputs["system_prompt"]
132 user_prompt = inputs["user_prompt"]
133 message = [{'role':'system','content':system_prompt},{'role':'user','content':user_prompt}]
134 response = self.llm.gen(message)
135 return response
136
137 async def _async_execute(self, input:Dict[str,str], spatial_info:Dict[str,Dict], temporal_info:Dict[str,Dict], mode: str = "default", **kwargs):
138 """Handle asynchronous execution across different KV cache modes."""

Callers

nothing calls this directly

Calls 3

_process_inputsMethod · 0.95
runMethod · 0.45
genMethod · 0.45

Tested by

no test coverage detected