fix ts
This commit is contained in:
parent
6b1b530443
commit
d9758be3ae
|
@ -59,7 +59,7 @@ export async function requestOpenai(req: NextRequest) {
|
|||
|
||||
if (isAzure) {
|
||||
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(
|
||||
"/api/azure/",
|
||||
"",
|
||||
|
|
|
@ -157,11 +157,11 @@ export class ChatGPTApi implements LLMApi {
|
|||
const model = models.find(
|
||||
(model) =>
|
||||
model.name == modelConfig.model &&
|
||||
model?.provider.providerName == ServiceProvider.Azure,
|
||||
model?.provider?.providerName == ServiceProvider.Azure,
|
||||
);
|
||||
chatPath = this.path(
|
||||
Azure.ChatPath(
|
||||
model?.displayName ?? model.name,
|
||||
(model?.displayName ?? model?.name) as string,
|
||||
useAccessStore.getState().azureApiVersion,
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue