Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/openai #160

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Feature/openai #160

wants to merge 7 commits into from

Conversation

nonumpa
Copy link
Member

@nonumpa nonumpa commented Jan 27, 2025

Use OpenAI to replace Gemini for better spam detection result

@@ -15,16 +13,39 @@ const langfuse = new Langfuse({
enabled: true, // set to false to disable sending events
});

const modelName = 'gemini-1.5-flash';
Copy link
Member

@MrOrz MrOrz Feb 3, 2025

Choose a reason for hiding this comment

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

我後來發現 gemini-1.5-flash 會預設是 gemini-1.5-flash-001
換成 gemini-1.5-flash-002 (gemini-1.5-flash-latest) 或 gemini-1.5-pro-002 (gemini-1.5-pro-latest) 的話,至少在逐字稿方面有顯著的進步
gemini-2.0-flash-exp 則是又快又準,但有很嚴格的 RPM quota

]);
for (const item of list) delete item.reason;
const sortedData = list.sort((a, b) => a.id.localeCompare(b.id));
expect(sortedData).toMatchInlineSnapshot(`
Copy link
Member

Choose a reason for hiding this comment

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

nit: can just snapshot sortedData.map(({id}) => id)

user: { id: 'tM9Gd4oBrkRFoI6raPG9', name: 'Zona' },
};

export const normalReply4 = {
Copy link
Member

Choose a reason for hiding this comment

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

can put unused fixtures in Langfuse dataset instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants