From 4690447e54fc2028dec8710dfc8c42b2e65aa788 Mon Sep 17 00:00:00 2001 From: okada Date: Sat, 2 Dec 2023 23:03:45 +0900 Subject: [PATCH] fix typo --- flatline_lsp.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/flatline_lsp.py b/flatline_lsp.py index 185110c..5ae8b37 100644 --- a/flatline_lsp.py +++ b/flatline_lsp.py @@ -39,17 +39,17 @@ def __init__( ): super().__init__(config) - self.baseckend_server_bin = backend_server_bin - self.baseckend_server_host = backend_server_host - self.baseckend_server_port = backend_server_port + self.backend_server_bin = backend_server_bin + self.backend_server_host = backend_server_host + self.backend_server_port = backend_server_port try: requests.get( - f"http://{self.baseckend_server_host}:{self.baseckend_server_port}" + f"http://{self.backend_server_host}:{self.backend_server_port}" ) except Exception: subprocess.Popen( ( - f"{self.baseckend_server_bin}" + f"{self.backend_server_bin}" f" --port {self.backend_server_port}" f" --model-path {model_name}" f" --n-threads {n_threads}" @@ -58,7 +58,7 @@ def __init__( ) while True: res = requests.get( - f"http://{self.baseckend_server_host}:{self.baseckend_server_port}" + f"http://{self.backend_server_host}:{self.backend_server_port}" ) if res.status_code == 200: break @@ -78,7 +78,7 @@ def forward( # type: ignore **kwargs, ) -> CausalLMOutput: res = requests.post( - f"http://{self.baseckend_server_host}:{self.baseckend_server_port}/v1/calc_next_token_logits", + f"http://{self.backend_server_host}:{self.backend_server_port}/v1/calc_next_token_logits", json=dict(input_tokens=input_ids[0].tolist()), ) res.raise_for_status()