mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	ban gpt4
This commit is contained in:
		@@ -13,7 +13,7 @@ function getModels(remoteModelRes: OpenAIListModelResponse) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (config.disableGPT4) {
 | 
					  if (config.disableGPT4) {
 | 
				
			||||||
    remoteModelRes.data = remoteModelRes.data.filter(
 | 
					    remoteModelRes.data = remoteModelRes.data.filter(
 | 
				
			||||||
      (m) => !m.id.startsWith("gpt-4"),
 | 
					      (m) => !m.id.startsWith("gpt-4") || m.id.startsWith("gpt-40-mini"),
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -119,10 +119,16 @@ export const getServerSideConfig = () => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (disableGPT4) {
 | 
					  if (disableGPT4) {
 | 
				
			||||||
    if (customModels) customModels += ",";
 | 
					    if (customModels) customModels += ",";
 | 
				
			||||||
    customModels += DEFAULT_MODELS.filter((m) => m.name.startsWith("gpt-4"))
 | 
					    customModels += DEFAULT_MODELS.filter(
 | 
				
			||||||
 | 
					      (m) => m.name.startsWith("gpt-4") && !m.name.startsWith("gpt-4o-mini"),
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
      .map((m) => "-" + m.name)
 | 
					      .map((m) => "-" + m.name)
 | 
				
			||||||
      .join(",");
 | 
					      .join(",");
 | 
				
			||||||
    if (defaultModel.startsWith("gpt-4")) defaultModel = "";
 | 
					    if (
 | 
				
			||||||
 | 
					      defaultModel.startsWith("gpt-4") &&
 | 
				
			||||||
 | 
					      !defaultModel.startsWith("gpt-4o-mini")
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					      defaultModel = "";
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const isStability = !!process.env.STABILITY_API_KEY;
 | 
					  const isStability = !!process.env.STABILITY_API_KEY;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user