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

Method get_time_pre_defined_strategy

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

Source from the content-addressed store, hash-verified

225 return prompts
226
227 def get_time_pre_defined_strategy(self, history, indicators = None):
228 if indicators == None:
229 raise ValueError("Missing indicators.")
230 prompts = {}
231 for prompt in history:
232 if prompt not in indicators:
233 continue
234 prompts[prompt] = []
235 for i, h in enumerate(history[prompt]):
236 if indicators[prompt][i]:
237 message = self.apply_template("time_pre_defined_strategy", 0, {})
238 prompts[prompt].append(self.build_chat_message(message, h))
239 else:
240 prompts[prompt].append(None)
241
242 return prompts
243
244 def get_time_chain_of_thought(self, rd, history, indicators = None):
245 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