Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed May 1, 2024
1 parent f8c24c7 commit 4029b47
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion e2e/projects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ test("create new project, rename it and delete it", async ({ page }) => {
await page.getByTestId("delete-project-button").click()
await page.getByTestId("delete-project-popover-button").click()

// If the project was deleted successfully, it redirects to the analytics page
// // If the project was deleted successfully, it redirects to the analytics page
await page.waitForURL("**/analytics")
})
98 changes: 49 additions & 49 deletions packages/backend/src/api/v1/radars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,55 +36,55 @@ const DEFAULT_RADARS = [
},
],
},
{
description:
"Answer potentially contains PII (Personal Identifiable Information)",
negative: true,
view: [
"AND",
{
id: "type",
params: {
type: "llm",
},
},
],
checks: [
"AND",
{
id: "pii",
params: {
field: "input",
type: "contains",
entities: ["person", "location", "email", "cc", "phone", "ssn"],
},
},
],
},
{
description: "Prompt contains PII (Personal Identifiable Information)",
negative: true,
view: [
"AND",
{
id: "type",
params: {
type: "llm",
},
},
],
checks: [
"AND",
{
id: "pii",
params: {
field: "input",
type: "contains",
entities: ["person", "location", "email", "cc", "phone", "ssn"],
},
},
],
},
// {
// description:
// "Answer potentially contains PII (Personal Identifiable Information)",
// negative: true,
// view: [
// "AND",
// {
// id: "type",
// params: {
// type: "llm",
// },
// },
// ],
// checks: [
// "AND",
// {
// id: "pii",
// params: {
// field: "input",
// type: "contains",
// entities: ["person", "location", "email", "cc", "phone", "ssn"],
// },
// },
// ],
// },
// {
// description: "Prompt contains PII (Personal Identifiable Information)",
// negative: true,
// view: [
// "AND",
// {
// id: "type",
// params: {
// type: "llm",
// },
// },
// ],
// checks: [
// "AND",
// {
// id: "pii",
// params: {
// field: "input",
// type: "contains",
// entities: ["person", "location", "email", "cc", "phone", "ssn"],
// },
// },
// ],
// },
{
description: "Contains profanity or toxic language",
negative: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/utils/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const sql = postgres(process.env.DATABASE_URL!, {
connection: {
application_name: `backend-${isProduction ? "production" : "development"}-${new Date().getTime()}`,
},
debug: process.env.DEBUG ? debugFn : () => {},
onnotice: process.env.DEUG ? console.log : () => {},// TODO: replace `() => {}` by false when porsager/postgres PR is merged
// debug: process.env.DEBUG ? debugFn : () => {},
// onnotice: process.env.DEUG ? console.log : () => {},// TODO: replace `() => {}` by false when porsager/postgres PR is merged
})

function debugFn(
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/checks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ export const CHECKS: Check[] = [
},
{
id: "pii",
soon: true,
name: "PII",
uiType: "ai",

Expand Down Expand Up @@ -701,7 +702,6 @@ export const CHECKS: Check[] = [
id: "sentiment",
name: "Sentiment",
uiType: "ai",
soon: true,
description: "Uses AI to detect the sentiment of the given field.",
params: [
FIELD_PARAM,
Expand Down

0 comments on commit 4029b47

Please sign in to comment.