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

Method get_time_chain_of_thought

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

Source from the content-addressed store, hash-verified

242 return prompts
243
244 def get_time_chain_of_thought(self, rd, history, indicators = None):
245 if indicators == None:
246 raise ValueError("Missing indicators.")
247 prompts = {}
248 for prompt in history:
249 if prompt not in indicators:
250 continue
251 prompts[prompt] = []
252 for i, h in enumerate(history[prompt]):
253 if indicators[prompt][i]:
254 message = self.apply_template("time_chain_of_thought", rd, {})
255 prompts[prompt].append(self.build_chat_message(message, h))
256 else:
257 prompts[prompt].append(None)
258
259 return prompts
260
261 def get_time_time_complexity_reduction(self, rd, history, indicators = None):
262 if 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