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

Method get_time_simple_instruction

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

Source from the content-addressed store, hash-verified

184 return prompts
185
186 def get_time_simple_instruction(self, history, indicators = None):
187 prompts = {}
188 if indicators == None:
189 raise ValueError("Missing indicators.")
190 for prompt in history:
191 if prompt not in indicators:
192 continue
193 prompts[prompt] = []
194 for i, h in enumerate(history[prompt]):
195 if indicators[prompt][i]:
196 message = self.apply_template("time_simple_instruction", 0, {})
197 prompts[prompt].append(self.build_chat_message(message, h))
198 else:
199 prompts[prompt].append(None)
200
201 return prompts
202
203 def get_time_in_context_learning(self, history, demos = None, demo_num = 1, indicators = None):
204 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