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

Method run

src/model.py:144–154  ·  view source on GitHub ↗
(self, prompt, times = 0, n = 20, temperature = 0.7)

Source from the content-addressed store, hash-verified

142
143
144 def run(self, prompt, times = 0, n = 20, temperature = 0.7):
145 if times > 4:
146 results = self.generate(prompt)
147 return results
148 else:
149 try:
150 results = self.generate(prompt, n = n, temperature = temperature)
151 return results
152 except Exception as e:
153 logger.error(str(e))
154 self.run(prompt, times = times + 1)
155
156
157

Callers 2

infer_openai_modelFunction · 0.95

Calls 1

generateMethod · 0.95

Tested by

no test coverage detected