(model, ids)
| 1113 | model.delete_file(i) |
| 1114 | |
| 1115 | def download_file(model, ids): |
| 1116 | model = RemoteModel(model) |
| 1117 | contents = [] |
| 1118 | for i in ids: |
| 1119 | contents += model.download_file(i) |
| 1120 | data = {} |
| 1121 | for d in contents: |
| 1122 | data[d["custom_id"]] = d["response"]["body"]["choices"][0]["message"] |
| 1123 | |
| 1124 | errors = [] |
| 1125 | for i in ids: |
| 1126 | errors += model.collect_errors(i) |
| 1127 | |
| 1128 | for e in errors: |
| 1129 | data[e["custom_id"]] = None |
| 1130 | |
| 1131 | with open("prompt_chat_results/gpt-4/time/rd1_batch_outputs.json", "w", encoding = "utf-8") as f: |
| 1132 | f.write(json.dumps(data, sort_keys=True, indent=4, separators=(',', ': '))) |
| 1133 | |
| 1134 | |
| 1135 | def batch_run(model, ids): |
nothing calls this directly
no test coverage detected