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

Method __init__

src/model.py:36–44  ·  view source on GitHub ↗
(self, model)

Source from the content-addressed store, hash-verified

34
35class RemoteModel(object):
36 def __init__(self, model) -> None:
37 if "gpt" in model:
38 if "OPENAI_KEY" not in os.environ:
39 print("Cannot find OPENAI_KEY, please set this variable in your shell.")
40 exit()
41 self.apikey = os.environ["OPENAI_KEY"]
42 self.client = OpenAI(api_key = self.apikey)
43 self.temperature = 0.7
44 self.model = model
45
46 def upload_file(self, filename):
47 response = self.client.files.create(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected