Model: Rename "Colab" to "Basic API"

This commit is contained in:
somebody
2023-03-07 17:07:01 -06:00
parent dc3dd38c4e
commit 6b45367cc7

View File

@@ -15,11 +15,11 @@ from modeling.inference_model import (
) )
class ColabException(Exception): class BasicAPIException(Exception):
"""To be used for errors when using the Colab API as an interface.""" """To be used for errors when using the Basic API as an interface."""
class ColabInferenceModel(InferenceModel): class BasicAPIInferenceModel(InferenceModel):
def __init__(self) -> None: def __init__(self) -> None:
super().__init__() super().__init__()
@@ -65,7 +65,7 @@ class ColabInferenceModel(InferenceModel):
req = requests.post(utils.koboldai_vars.colaburl, json=reqdata) req = requests.post(utils.koboldai_vars.colaburl, json=reqdata)
if req.status_code != 200: if req.status_code != 200:
raise ColabException(f"Bad status code {req.status_code}") raise BasicAPIException(f"Bad status code {req.status_code}")
# Deal with the response # Deal with the response
js = req.json()["data"] js = req.json()["data"]