diff --git a/chatdesk-ui/components/chat/chat-helpers/index.ts b/chatdesk-ui/components/chat/chat-helpers/index.ts index de6d763..9b04395 100644 --- a/chatdesk-ui/components/chat/chat-helpers/index.ts +++ b/chatdesk-ui/components/chat/chat-helpers/index.ts @@ -24,6 +24,12 @@ import { toast } from "sonner" import { v4 as uuidv4 } from "uuid" import { getRuntimeEnv } from "@/lib/ipconfig" + +type RetrievedFileItem = Tables<"file_items"> & { + similarity: number +} + + export const validateChatSettings = ( chatSettings: ChatSettings | null, modelData: LLM | undefined, @@ -74,7 +80,8 @@ export const handleRetrieval = async ( } const { results } = (await response.json()) as { - results: Tables<"file_items">[] + //results: Tables<"file_items">[] + results: RetrievedFileItem[] } // return results