mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix api
This commit is contained in:
@@ -1916,7 +1916,7 @@ def load_model(use_gpu=True, gpu_layers=None, disk_layers=None, initial_load=Fal
|
|||||||
model = BasicAPIInferenceModel()
|
model = BasicAPIInferenceModel()
|
||||||
elif koboldai_vars.model == "API":
|
elif koboldai_vars.model == "API":
|
||||||
from modeling.inference_models.api import APIInferenceModel
|
from modeling.inference_models.api import APIInferenceModel
|
||||||
model = APIInferenceModel()
|
model = APIInferenceModel(url.replace("/request", ""))
|
||||||
elif koboldai_vars.model == "CLUSTER":
|
elif koboldai_vars.model == "CLUSTER":
|
||||||
from modeling.inference_models.horde import HordeInferenceModel
|
from modeling.inference_models.horde import HordeInferenceModel
|
||||||
model = HordeInferenceModel()
|
model = HordeInferenceModel()
|
||||||
|
@@ -23,7 +23,7 @@ class APIException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class APIInferenceModel(InferenceModel):
|
class APIInferenceModel(InferenceModel):
|
||||||
def __init__(self, base_url: str = "http://localhost:5000") -> None:
|
def __init__(self, base_url: str) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.base_url = base_url
|
self.base_url = base_url
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user