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

Bugfixes and Evaluation Dashboard #50

Merged
merged 15 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Bug fix
  • Loading branch information
karthikscale3 committed Apr 5, 2024
commit 0e963e226af17ffdba6282496d1979c6e30c20ad
1 change: 0 additions & 1 deletion app/api/user/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export async function PUT(req: NextRequest) {
}

if ("status" in data) {
console.log("updating status");
const user = await prisma.user.update({
where: {
id,
Expand Down
2 changes: 0 additions & 2 deletions components/project/traces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ export default function Traces({ email }: { email: string }) {
}

// Merge the new data with the existing data
console.log("currentData", currentData);
console.log("newData", newData);
if (currentData.length > 0) {
const updatedData = [...currentData, ...newData];

Expand Down
1 change: 1 addition & 0 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ export function calculatePriceFromUsage(
output_tokens: number;
}
): any {
if (!model) return { total: 0, input: 0, output: 0 };
if (vendor === "openai") {
const costTable = OPENAI_PRICING[model.includes("gpt-4") ? "gpt-4" : model];
if (costTable) {
Expand Down