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

Method load_examples

src/prompt.py:23–28  ·  view source on GitHub ↗
(self, file_path = None)

Source from the content-addressed store, hash-verified

21 self.templates = json.load(open(self.template_file_path, "r"))
22
23 def load_examples(self, file_path = None):
24 if not file_path:
25 self.example_file_path = "src/fixed_examples.json"
26 else:
27 self.example_file_path = file_path
28 self.examples = json.load(open(self.example_file_path, "r"))
29
30 def save_templates(self):
31 with open(self.template_file_path, "w", encoding = "utf-8") as f:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected