(self, model)
| 34 | |
| 35 | class 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( |
nothing calls this directly
no outgoing calls
no test coverage detected