MCPcopy Create free account
hub / github.com/SalesforceAIResearch/perfcodegen / get_time_time_complexity_reduction

Method get_time_time_complexity_reduction

src/prompt.py:261–276  ·  view source on GitHub ↗
(self, rd, history, indicators = None)

Source from the content-addressed store, hash-verified

259 return prompts
260
261 def get_time_time_complexity_reduction(self, rd, history, indicators = None):
262 if indicators == None:
263 raise ValueError("Missing indicators.")
264 prompts = {}
265 for prompt in history:
266 if prompt not in indicators:
267 continue
268 prompts[prompt] = []
269 for i, h in enumerate(history[prompt]):
270 if indicators[prompt][i]:
271 message = self.apply_template("time_time_complexity_reduction", rd, {})
272 prompts[prompt].append(self.build_chat_message(message, h))
273 else:
274 prompts[prompt].append(None)
275
276 return prompts
277
278
279 def get_time_simple_execution_feedback(self, rd, history, times = None, indicators = None):

Callers 1

get_chat_promptsMethod · 0.95

Calls 2

apply_templateMethod · 0.95
build_chat_messageMethod · 0.95

Tested by

no test coverage detected