55 useModalState ,
66} from "./modal-context" ;
77import { Chunk } from "../types" ;
8- import { getFingerprint } from "@thumbmarkjs/thumbmarkjs" ;
98import { useEffect } from "react" ;
109import { trackViews } from "../trieve" ;
1110import {
@@ -722,7 +721,7 @@ function ChatProvider({ children }: { children: React.ReactNode }) {
722721 filters : filtersWithoutGroupIds ,
723722 page_size : 10 ,
724723 group_id : curGroup . id ,
725- user_id : await getFingerprint ( ) ,
724+ user_id : fingerprint ,
726725 } ,
727726 searchAbortController . current . signal ,
728727 ) ;
@@ -749,7 +748,7 @@ function ChatProvider({ children }: { children: React.ReactNode }) {
749748 filters : filters ,
750749 page_size : 20 ,
751750 group_size : 1 ,
752- user_id : await getFingerprint ( ) ,
751+ user_id : fingerprint ,
753752 } ,
754753 searchAbortController . current . signal ,
755754 ) ;
@@ -917,9 +916,11 @@ function ChatProvider({ children }: { children: React.ReactNode }) {
917916 : "OpenAI is down unfortunately. Please try again later." ,
918917 ) ;
919918 } ,
920- imageUrl || curAudioBase64 ? 20000 : 10000 ,
919+ imageUrl || curAudioBase64 ? 20000 : 1000000 ,
921920 ) ;
922921 try {
922+ // wait 5 seconds
923+ await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) ) ;
923924 const createMessageResp =
924925 await trieveSDK . createMessageReaderWithQueryId (
925926 {
@@ -934,7 +935,7 @@ function ChatProvider({ children }: { children: React.ReactNode }) {
934935 completion_first : false ,
935936 } ,
936937 concat_user_messages_query : true ,
937- user_id : await getFingerprint ( ) ,
938+ user_id : fingerprint ,
938939 page_size : props . searchOptions ?. page_size ?? ( curGroup ? 10 : 8 ) ,
939940 score_threshold : props . searchOptions ?. score_threshold || null ,
940941 use_group_search : props . useGroupSearch ,
@@ -957,6 +958,7 @@ function ChatProvider({ children }: { children: React.ReactNode }) {
957958 transcribedQuery = headers [ "x-tr-query" ] ;
958959 }
959960 } ,
961+ props . overrideFetch ?? false
960962 ) ;
961963 reader = createMessageResp . reader ;
962964 queryId = createMessageResp . queryId ;
0 commit comments