Spaces:
Sleeping
Sleeping
Commit
·
a2e4026
1
Parent(s):
c44c6d5
Update model_inference.py
Browse files- model_inference.py +3 -0
model_inference.py
CHANGED
@@ -73,6 +73,9 @@ def prompt_formatting(model, instruction, cot):
|
|
73 |
return {"model": model, "content": prompt.format(instruction)}
|
74 |
|
75 |
def Inference(model_list, question, API_KEY, auth_token, round, cot):
|
|
|
|
|
|
|
76 |
openai.api_key = API_KEY
|
77 |
|
78 |
prompt_dict, endpoint_dict = load_json("src/prompt_template.json", "src/inference_endpoint.json")
|
|
|
73 |
return {"model": model, "content": prompt.format(instruction)}
|
74 |
|
75 |
def Inference(model_list, question, API_KEY, auth_token, round, cot):
|
76 |
+
if len(model_list) != 3:
|
77 |
+
raise ValueError("Please choose just '3' models! Neither more nor less!")
|
78 |
+
|
79 |
openai.api_key = API_KEY
|
80 |
|
81 |
prompt_dict, endpoint_dict = load_json("src/prompt_template.json", "src/inference_endpoint.json")
|