To be overriden by the descendant class
(self, input:Dict[str,str], spatial_info:Dict[str,Any], temporal_info:Dict[str,Any],**kwargs)
| 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 """ |
nothing calls this directly
no test coverage detected