← back to Exo
removing uneccesary console logs and fixing order of variables in index.js
7d7bdd83ed3ade828cc507fc15133dcf56ef9c33 · 2024-11-13 15:15:03 -0800 · cadenmackenzie
Files touched
M exo/api/chatgpt_api.pyM exo/tinychat/index.js
Diff
commit 7d7bdd83ed3ade828cc507fc15133dcf56ef9c33
Author: cadenmackenzie <cadenmackenzie@gmail.com>
Date: Wed Nov 13 15:15:03 2024 -0800
removing uneccesary console logs and fixing order of variables in index.js
---
exo/api/chatgpt_api.py | 15 +++------------
exo/tinychat/index.js | 8 ++++----
2 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/exo/api/chatgpt_api.py b/exo/api/chatgpt_api.py
index d0ee3d1b..76734fce 100644
--- a/exo/api/chatgpt_api.py
+++ b/exo/api/chatgpt_api.py
@@ -255,16 +255,11 @@ class ChatGPTAPI:
async def handle_model_support(self, request):
try:
- print("\n=== Model Support Handler Started ===")
model_pool = {}
- print("\nAvailable Models:")
- print("-" * 50)
for model_name, pretty in pretty_name.items():
- print(f"\nChecking model: {model_name}")
if model_name in model_cards:
model_info = model_cards[model_name]
- print(f"Model info: {model_info}")
# Get required engines
required_engines = list(dict.fromkeys([
@@ -273,25 +268,21 @@ class ChatGPTAPI:
for engine_name in engine_list
if engine_name is not None
] + [self.inference_engine_classname]))
- print(f"Required engines: {required_engines}")
# Check if model supports required engines
if all(map(lambda engine: engine in model_info["repo"], required_engines)):
is_downloaded = self.is_model_downloaded(model_name)
- print(f"Model {model_name} download status: {is_downloaded}")
+ if DEBUG >= 2:
+ print(f"Model {model_name} download status: {is_downloaded}")
model_pool[model_name] = {
"name": pretty,
"downloaded": is_downloaded
}
- print("\nFinal model pool:")
- print(json.dumps(model_pool, indent=2))
- print("\n=== Model Support Handler Completed ===\n")
-
return web.json_response({"model pool": model_pool})
except Exception as e:
- print(f"\nError in handle_model_support: {str(e)}")
+ print(f"Error in handle_model_support: {str(e)}")
traceback.print_exc()
return web.json_response(
{"detail": f"Server error: {str(e)}"},
diff --git a/exo/tinychat/index.js b/exo/tinychat/index.js
index c7e799ab..9c64853f 100644
--- a/exo/tinychat/index.js
+++ b/exo/tinychat/index.js
@@ -10,15 +10,15 @@ document.addEventListener("alpine:init", () => {
// historical state
histories: JSON.parse(localStorage.getItem("histories")) || [],
+ home: 0,
+ generating: false,
+ endpoint: `${window.location.origin}/v1`,
+
// Initialize error message structure
errorMessage: null,
errorExpanded: false,
errorTimeout: null,
- home: 0,
- generating: false,
- endpoint: `${window.location.origin}/v1`,
-
// performance tracking
time_till_first: 0,
tokens_per_second: 0,
← de09e2a8 reusing helper function to get cached directory
·
back to Exo
·
removing error separtation so I can put in different PR fb32a851 →