Skip to content

Commit

Permalink
fix: convert the detail level
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 13, 2023
1 parent 33b8f49 commit 70365fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export async function middleware(req: NextRequest, context: NextFetchEvent) {
const { userConfig, videoConfig } = (await req.json()) as SummarizeParams;
// TODO: update shouldShowTimestamp to use videoConfig
const { userKey, shouldShowTimestamp } = userConfig || {};
const { videoId: bvId } = videoConfig || {};
const cacheId = shouldShowTimestamp ? `timestamp-${bvId}` : bvId;
const { videoId } = videoConfig || {};
const cacheId = shouldShowTimestamp ? `timestamp-${videoId}` : videoId;
const ipIdentifier = req.ip ?? "127.0.0.11";

// licenseKeys
Expand Down
2 changes: 1 addition & 1 deletion pages/api/sumup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default async function handler(
// top_p: 1,
// frequency_penalty: 0,
// presence_penalty: 0,
max_tokens: videoConfig.detailLevel || (userKey ? 800 : 600),
max_tokens: Number(videoConfig.detailLevel) || (userKey ? 800 : 600),
stream,
// n: 1,
};
Expand Down

1 comment on commit 70365fa

@vercel
Copy link

@vercel vercel bot commented on 70365fa Mar 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.