Skip to content

Commit

Permalink
fix: show ip for user key
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 8, 2023
1 parent dbee3e6 commit 815b1df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/openai/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function getSummaryPrompt(title: string, transcript: any, promptConfig: P
// Seems like 15,000 bytes is the limit for the prompt
const limit = 7000; // 1000 is a buffer

// todo: update to getSmallSizeTranscripts https://github.com/lxfater/BilibiliSummary/blob/3d1a67cbe8e96adba60672b778ce89644a43280d/src/prompt.ts#L62
export function getChunckedTranscripts(textData: { text: any; index: any; }[], textDataOriginal: any[]) {

// [Thought Process]
Expand Down
2 changes: 1 addition & 1 deletion pages/api/summarize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default async function handler(
});

try {
userKey && console.log("========use user apiKey========");
userKey && console.log("========use user apiKey========", req.ip);
isDev && console.log("prompt", prompt);
const payload = {
model: "gpt-3.5-turbo",
Expand Down

1 comment on commit 815b1df

@vercel
Copy link

@vercel vercel bot commented on 815b1df Mar 8, 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.