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

Method _execute

KVCOMM/agents/code_writing.py:171–188  ·  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

169 return results
170
171 def _execute(self, input:Dict[str,str], spatial_info:Dict[str,Any], temporal_info:Dict[str,Any],**kwargs):
172 """ To be overriden by the descendant class """
173 """ Use the processed input to get the result """
174 self.internal_tests = self.extract_example(input)
175 inputs = asyncio.run(
176 self._process_inputs(
177 input,
178 spatial_info,
179 temporal_info,
180 mode="default",
181 **kwargs,
182 )
183 )
184 system_prompt = inputs["system_prompt"]
185 user_prompt = inputs["user_prompt"]
186 message = [{'role':'system','content':system_prompt},{'role':'user','content':user_prompt}]
187 response = self.llm.gen(message)
188 return response
189
190 async def _async_execute(self, input:Dict[str,str], spatial_info:Dict[str,Any], temporal_info:Dict[str,Any], mode: str = "default", **kwargs):
191 """ To be overriden by the descendant class """

Callers

nothing calls this directly

Calls 4

extract_exampleMethod · 0.95
_process_inputsMethod · 0.95
runMethod · 0.45
genMethod · 0.45

Tested by

no test coverage detected