diff --git a/llm_server/llm/__init__.py b/llm_server/llm/__init__.py index 09f1ad7..7736684 100644 --- a/llm_server/llm/__init__.py +++ b/llm_server/llm/__init__.py @@ -4,6 +4,9 @@ from llm_server.custom_redis import redis def get_token_count(prompt: str, backend_url: str): + if not isinstance(prompt, str): + print(prompt) + assert isinstance(prompt, str) assert isinstance(backend_url, str) diff --git a/server.py b/server.py index f604763..5966bfb 100644 --- a/server.py +++ b/server.py @@ -12,8 +12,8 @@ from pathlib import Path import simplejson as json from flask import Flask, jsonify, render_template, request -from llm_server.cluster.cluster_config import cluster_config from llm_server.cluster.backend import get_model_choices +from llm_server.cluster.cluster_config import cluster_config from llm_server.config.config import mode_ui_names from llm_server.config.load import load_config from llm_server.database.conn import database