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

Method _execute

KVCOMM/agents/math_solver.py:124–140  ·  view source on GitHub ↗

To be overriden by the descendant class

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

Source from the content-addressed store, hash-verified

122 return {"system_prompt": system_prompt, "user_prompt": user_prompt}
123
124 def _execute(self, input:Dict[str,str], spatial_info:Dict[str,Any], temporal_info:Dict[str,Any],**kwargs):
125 """ To be overriden by the descendant class """
126 """ Use the processed input to get the result """
127 inputs = asyncio.run(
128 self._process_inputs(
129 input,
130 spatial_info,
131 temporal_info,
132 mode="default",
133 **kwargs,
134 )
135 )
136 system_prompt = inputs["system_prompt"]
137 user_prompt = inputs["user_prompt"]
138 message = [{'role':'system','content':system_prompt},{'role':'user','content':user_prompt}]
139 response = self.llm.gen(message)
140 return response
141
142 async def _async_execute(self, input:Dict[str,str], spatial_info:Dict[str,Any], temporal_info:Dict[str,Any], mode: str = "default", **kwargs):
143 """ To be overriden by the descendant class """

Callers

nothing calls this directly

Calls 3

_process_inputsMethod · 0.95
runMethod · 0.45
genMethod · 0.45

Tested by

no test coverage detected