bep40 commited on
Commit
1de664b
·
verified ·
1 Parent(s): c955b52

Upload patch_frontend.py

Browse files
Files changed (1) hide show
  1. patch_frontend.py +4 -8
patch_frontend.py CHANGED
@@ -33,7 +33,7 @@ with open(MODEL_FILE, "w") as f:
33
  f.write(model_content)
34
  print("✅ model.ts constants updated — no Owl Alpha, Tencent HY3 added via ChatInput.tsx")
35
 
36
- # === Step 2: Patch ChatInput.tsx — remove Owl Alpha, add Tencent HY3:free as default ===
37
  FILE = "/source/frontend/src/components/Chat/ChatInput.tsx"
38
  with open(FILE, "r") as f:
39
  content = f.read()
@@ -60,10 +60,6 @@ content = content.replace(
60
  " {\n id: 'nemotron-120b',\n name: 'nvidia/nemotron-3-super-120b-a12b:free',\n modelPath: DEEPSEEK_V4_PRO_MODEL_PATH,\n avatarUrl: 'https://huggingface.co/api/avatars/nvidia',\n },"
61
  )
62
 
63
- # Remove existing Tencent HY3 entry with wrong path, add new one at the end
64
- # First, find and remove the old Tencent HY3 entry that has 'openai/tencent/hy3:free'
65
- # Then add the correct one at the end
66
-
67
  # Remove old Tencent HY3 entry (with wrong path openai/tencent/hy3:free)
68
  old_tencent_block = """ {
69
  id: 'tencent-hy3',
@@ -88,8 +84,8 @@ if idx_end > 0:
88
  },
89
  {
90
  id: 'tencent-hy3',
91
- name: 'Tencent HY3:free',
92
- modelPath: 'tencent/hy3:free',
93
  avatarUrl: 'https://huggingface.co/api/avatars/tencent',
94
  recommended: true,
95
  },
@@ -126,4 +122,4 @@ print(" Row 3 (Kimi): DeepSeek V4 Pro")
126
  print(" Row 4 (MiniMax): DeepSeek V4 Flash")
127
  print(" Row 5 (GLM): DeepSeek V4 Flash (OR)")
128
  print(" Row 6 (DeepSeek): nvidia/nemotron-3-super-120b-a12b:free")
129
- print(" NEW: Gemma 4 31B, Tencent HY3:free (DEFAULT), Gemma 3 1B, Qwen3 Coder Next, Gemini 2.0 Flash")
 
33
  f.write(model_content)
34
  print("✅ model.ts constants updated — no Owl Alpha, Tencent HY3 added via ChatInput.tsx")
35
 
36
+ # === Step 2: Patch ChatInput.tsx — remove Owl Alpha, add Tencent HY3 as default ===
37
  FILE = "/source/frontend/src/components/Chat/ChatInput.tsx"
38
  with open(FILE, "r") as f:
39
  content = f.read()
 
60
  " {\n id: 'nemotron-120b',\n name: 'nvidia/nemotron-3-super-120b-a12b:free',\n modelPath: DEEPSEEK_V4_PRO_MODEL_PATH,\n avatarUrl: 'https://huggingface.co/api/avatars/nvidia',\n },"
61
  )
62
 
 
 
 
 
63
  # Remove old Tencent HY3 entry (with wrong path openai/tencent/hy3:free)
64
  old_tencent_block = """ {
65
  id: 'tencent-hy3',
 
84
  },
85
  {
86
  id: 'tencent-hy3',
87
+ name: 'Tencent HY3',
88
+ modelPath: 'tencent/hy3',
89
  avatarUrl: 'https://huggingface.co/api/avatars/tencent',
90
  recommended: true,
91
  },
 
122
  print(" Row 4 (MiniMax): DeepSeek V4 Flash")
123
  print(" Row 5 (GLM): DeepSeek V4 Flash (OR)")
124
  print(" Row 6 (DeepSeek): nvidia/nemotron-3-super-120b-a12b:free")
125
+ print(" NEW: Gemma 4 31B, Tencent HY3 (DEFAULT), Gemma 3 1B, Qwen3 Coder Next, Gemini 2.0 Flash")