From e0f86d053a70d14afb37760237f5a17119257743 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sat, 30 Sep 2023 19:42:41 -0600 Subject: [PATCH] reorganize to api v2 --- daemon.py | 2 +- llm_server/routes/{v1 => v2}/__init__.py | 0 llm_server/routes/{v1 => v2}/generate.py | 0 llm_server/routes/{v1 => v2}/generate_stats.py | 0 llm_server/routes/{v1 => v2}/generate_stream.py | 0 llm_server/routes/{v1 => v2}/info.py | 0 llm_server/routes/{v1 => v2}/proxy.py | 0 llm_server/workers/threader.py | 2 +- server.py | 4 ++-- 9 files changed, 4 insertions(+), 4 deletions(-) rename llm_server/routes/{v1 => v2}/__init__.py (100%) rename llm_server/routes/{v1 => v2}/generate.py (100%) rename llm_server/routes/{v1 => v2}/generate_stats.py (100%) rename llm_server/routes/{v1 => v2}/generate_stream.py (100%) rename llm_server/routes/{v1 => v2}/info.py (100%) rename llm_server/routes/{v1 => v2}/proxy.py (100%) diff --git a/daemon.py b/daemon.py index 0fa3601..aac2657 100644 --- a/daemon.py +++ b/daemon.py @@ -10,7 +10,7 @@ from llm_server.config.load import load_config, parse_backends from llm_server.custom_redis import redis from llm_server.database.create import create_db from llm_server.routes.queue import priority_queue -from llm_server.routes.v1.generate_stats import generate_stats +from llm_server.routes.v2.generate_stats import generate_stats from llm_server.workers.threader import start_background script_path = os.path.dirname(os.path.realpath(__file__)) diff --git a/llm_server/routes/v1/__init__.py b/llm_server/routes/v2/__init__.py similarity index 100% rename from llm_server/routes/v1/__init__.py rename to llm_server/routes/v2/__init__.py diff --git a/llm_server/routes/v1/generate.py b/llm_server/routes/v2/generate.py similarity index 100% rename from llm_server/routes/v1/generate.py rename to llm_server/routes/v2/generate.py diff --git a/llm_server/routes/v1/generate_stats.py b/llm_server/routes/v2/generate_stats.py similarity index 100% rename from llm_server/routes/v1/generate_stats.py rename to llm_server/routes/v2/generate_stats.py diff --git a/llm_server/routes/v1/generate_stream.py b/llm_server/routes/v2/generate_stream.py similarity index 100% rename from llm_server/routes/v1/generate_stream.py rename to llm_server/routes/v2/generate_stream.py diff --git a/llm_server/routes/v1/info.py b/llm_server/routes/v2/info.py similarity index 100% rename from llm_server/routes/v1/info.py rename to llm_server/routes/v2/info.py diff --git a/llm_server/routes/v1/proxy.py b/llm_server/routes/v2/proxy.py similarity index 100% rename from llm_server/routes/v1/proxy.py rename to llm_server/routes/v2/proxy.py diff --git a/llm_server/workers/threader.py b/llm_server/workers/threader.py index 0c82559..89a6770 100644 --- a/llm_server/workers/threader.py +++ b/llm_server/workers/threader.py @@ -4,7 +4,7 @@ from threading import Thread from llm_server import opts from llm_server.cluster.stores import redis_running_models from llm_server.cluster.worker import cluster_worker -from llm_server.routes.v1.generate_stats import generate_stats +from llm_server.routes.v2.generate_stats import generate_stats from llm_server.workers.inferencer import start_workers from llm_server.workers.mainer import main_background_thread from llm_server.workers.moderator import start_moderation_workers diff --git a/server.py b/server.py index 699290f..8c287be 100644 --- a/server.py +++ b/server.py @@ -21,7 +21,7 @@ from llm_server.database.create import create_db from llm_server.pre_fork import server_startup from llm_server.routes.openai import openai_bp from llm_server.routes.server_error import handle_server_error -from llm_server.routes.v1 import bp +from llm_server.routes.v2 import bp from llm_server.sock import init_socketio # TODO: per-backend workers @@ -65,7 +65,7 @@ from llm_server.helpers import auto_set_base_client_api from llm_server.llm.vllm.info import vllm_info from llm_server.custom_redis import flask_cache from llm_server.llm import redis -from llm_server.routes.v1.generate_stats import generate_stats +from llm_server.routes.v2.generate_stats import generate_stats app = Flask(__name__) init_socketio(app)