mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	fix ts
This commit is contained in:
		@@ -59,7 +59,7 @@ export async function requestOpenai(req: NextRequest) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (isAzure) {
 | 
					  if (isAzure) {
 | 
				
			||||||
    const azureApiVersion = req?.nextUrl?.searchParams?.get("api-version");
 | 
					    const azureApiVersion = req?.nextUrl?.searchParams?.get("api-version");
 | 
				
			||||||
    baseUrl = baseUrl.split("/deployments").shift();
 | 
					    baseUrl = baseUrl.split("/deployments").shift() as string;
 | 
				
			||||||
    path = `${req.nextUrl.pathname.replaceAll(
 | 
					    path = `${req.nextUrl.pathname.replaceAll(
 | 
				
			||||||
      "/api/azure/",
 | 
					      "/api/azure/",
 | 
				
			||||||
      "",
 | 
					      "",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -157,11 +157,11 @@ export class ChatGPTApi implements LLMApi {
 | 
				
			|||||||
        const model = models.find(
 | 
					        const model = models.find(
 | 
				
			||||||
          (model) =>
 | 
					          (model) =>
 | 
				
			||||||
            model.name == modelConfig.model &&
 | 
					            model.name == modelConfig.model &&
 | 
				
			||||||
            model?.provider.providerName == ServiceProvider.Azure,
 | 
					            model?.provider?.providerName == ServiceProvider.Azure,
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        chatPath = this.path(
 | 
					        chatPath = this.path(
 | 
				
			||||||
          Azure.ChatPath(
 | 
					          Azure.ChatPath(
 | 
				
			||||||
            model?.displayName ?? model.name,
 | 
					            (model?.displayName ?? model?.name) as string,
 | 
				
			||||||
            useAccessStore.getState().azureApiVersion,
 | 
					            useAccessStore.getState().azureApiVersion,
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user