From 3d0a5cf0a2fb25e12cabd7201b4a87c695fdd09a Mon Sep 17 00:00:00 2001 From: Cyberes Date: Thu, 5 Oct 2023 18:06:36 -0600 Subject: [PATCH] t --- llm_server/llm/__init__.py | 3 +++ server.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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