Skip to content

Commit

Permalink
fix ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydzhou committed Jul 5, 2024
1 parent 6b1b530 commit d9758be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/api/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
"",
Expand Down
4 changes: 2 additions & 2 deletions app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
);
Expand Down

0 comments on commit d9758be

Please sign in to comment.