Skip to content

Commit

Permalink
Fix typechecks
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Jan 5, 2025
1 parent 0956901 commit 1b52710
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apps/workers/embeddingsWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DequeuedJob, Runner } from "liteque";

import type { EmbeddingsRequest, ZOpenAIRequest } from "@hoarder/shared/queues";
import { db } from "@hoarder/db";
import { bookmarkEmbeddings, bookmarks } from "@hoarder/db/schema";
import { bookmarks } from "@hoarder/db/schema";
import serverConfig from "@hoarder/shared/config";
import { InferenceClientFactory } from "@hoarder/shared/inference";
import logger from "@hoarder/shared/logger";
Expand All @@ -14,10 +14,12 @@ import {
} from "@hoarder/shared/queues";
import { getBookmarkVectorDb } from "@hoarder/shared/vectorDb";

type EmbeddingChunk = Pick<
typeof bookmarkEmbeddings.$inferSelect,
"embeddingType" | "fromOffset" | "toOffset"
> & { text: string };
interface EmbeddingChunk {
embeddingType: "description" | "content_full" | "content_chunk";
fromOffset: number;
toOffset: number;
text: string;
}

export class EmbeddingsWorker {
static build() {
Expand Down

0 comments on commit 1b52710

Please sign in to comment.