fix ts
This commit is contained in:
parent
6b1b530443
commit
d9758be3ae
|
@ -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,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue