letterm commited on
Commit
908c9f7
·
verified ·
1 Parent(s): 0273be4

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +5 -2
index.js CHANGED
@@ -36,6 +36,7 @@ const CONFIG = {
36
  "grok-3": "grok-3",
37
  "grok-3-deepsearch": "grok-3",
38
  "grok-3-reasoning": "grok-3",
 
39
  },
40
  IS_IMG_GEN: false,
41
  IS_THINKING: false
@@ -282,7 +283,9 @@ class TwitterGrokApiClient {
282
  },
283
  enableCustomization: true,
284
  enableSideBySide: false,
285
- toolOverrides: {},
 
 
286
  isDeepsearch: this.modelType.isDeepSearch,
287
  isReasoning: this.modelType.isReasoning
288
  };
@@ -536,7 +539,7 @@ app.post('/hf/v1/chat/completions', async (req, res) => {
536
 
537
  // 404 处理
538
  app.use((req, res) => {
539
- res.status(404).json({ message: '服务运行中' });
540
  });
541
 
542
  // 启动服务器
 
36
  "grok-3": "grok-3",
37
  "grok-3-deepsearch": "grok-3",
38
  "grok-3-reasoning": "grok-3",
39
+ "grok-3-imageGen": "grok-3",
40
  },
41
  IS_IMG_GEN: false,
42
  IS_THINKING: false
 
283
  },
284
  enableCustomization: true,
285
  enableSideBySide: false,
286
+ toolOverrides: {
287
+ imageGen: request.model === 'grok-3-imageGen',
288
+ },
289
  isDeepsearch: this.modelType.isDeepSearch,
290
  isReasoning: this.modelType.isReasoning
291
  };
 
539
 
540
  // 404 处理
541
  app.use((req, res) => {
542
+ res.status(404).json({ error: '请求路径不存在' });
543
  });
544
 
545
  // 启动服务器