From 1730caf14445d57971b915e23e50c30275568214 Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 29 May 2025 13:55:24 +0800 Subject: [PATCH] . --- chatdesk-ui/components/chat/chat-helpers/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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