Skip to content

Commit

Permalink
Remove embeddings
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Jun 11, 2024
1 parent fae1670 commit 871d219
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 186 deletions.
Binary file modified bun.lockb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const model = new Supabase.ai.Session("gte-small");

Deno.serve(async (req) => {
const payload: WebhookPayload = await req.json();
const { id, name, system } = payload.record;
const { id, name } = payload.record;

if (name === payload?.old_record?.name) {
return new Response("No change");
Expand Down
58 changes: 0 additions & 58 deletions packages/supabase/functions/generate-inbox-embedding/index.ts

This file was deleted.

This file was deleted.

65 changes: 0 additions & 65 deletions packages/supabase/functions/search/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/supabase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@supabase/ssr": "^0.3.0",
"react": "^18.3.1",
"server-only": "^0.0.1",
"supabase": "^1.172.2"
"supabase": "^1.176.4"
},
"devDependencies": {
"@supabase/supabase-js": "^2.43.4",
Expand Down
7 changes: 3 additions & 4 deletions packages/supabase/src/queries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,8 @@ export async function getInboxQuery(
.from("inbox")
.select(columns.join(","))
.eq("team_id", teamId)
.order("created_at", { ascending });
.order("created_at", { ascending })
.neq("status", "deleted");

if (done) {
query.not("transaction_id", "is", null);
Expand All @@ -731,11 +732,9 @@ export async function getInboxQuery(
}

const { data } = await query.range(from, to);
// TODO: Fix neq in query
const filteredData = data?.filter((item) => item.status !== "deleted");

return {
data: filteredData?.map((item) => {
data: data?.map((item) => {
const pending = isWithinInterval(new Date(), {
start: new Date(item.created_at),
end: addDays(new Date(item.created_at), 45),
Expand Down

0 comments on commit 871d219

Please sign in to comment.