diff --git a/application/retriever/classic_rag.py b/application/retriever/classic_rag.py index aef6e503..32f51234 100644 --- a/application/retriever/classic_rag.py +++ b/application/retriever/classic_rag.py @@ -61,13 +61,12 @@ class ClassicRAG(BaseRetriever): settings.VECTOR_STORE, self.vectorstore, settings.EMBEDDINGS_KEY ) docs_temp = docsearch.search(self.question, k=self.chunks) + print(docs_temp) docs = [ { - "title": ( - i.metadata["title"].split("/")[-1] - if i.metadata - else i.page_content - ), + "title": i.metadata.get( + "title", i.metadata.get("post_title", i.page_content) + ).split("/")[-1], "text": i.page_content, "source": ( i.metadata.get("source") diff --git a/frontend/src/components/Input.tsx b/frontend/src/components/Input.tsx index 56ca1d52..17e60190 100644 --- a/frontend/src/components/Input.tsx +++ b/frontend/src/components/Input.tsx @@ -10,6 +10,7 @@ const Input = ({ maxLength, className, colorVariant = 'silver', + borderVariant = 'thick', children, onChange, onPaste, @@ -20,10 +21,13 @@ const Input = ({ jet: 'border-jet', gray: 'border-gray-5000 dark:text-silver', }; - + const borderStyles = { + thin: 'border', + thick: 'border-2', + }; return ( 3 && (
{`View ${ diff --git a/frontend/src/index.css b/frontend/src/index.css index 6ae4b762..025059ac 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -424,6 +424,26 @@ template { width: 0; } +input:-webkit-autofill { + -webkit-box-shadow: 0 0 0 50px white inset; +} + +input:-webkit-autofill:focus { + -webkit-box-shadow: 0 0 0 50px white inset; +} + +@media (prefers-color-scheme: dark) { + input:-webkit-autofill { + -webkit-box-shadow: 0 0 0 50px rgb(68, 70, 84) inset; + -webkit-text-fill-color: white; + } + + input:-webkit-autofill:focus { + -webkit-box-shadow: 0 0 0 50px rgb(68, 70, 84) inset; + -webkit-text-fill-color: white; + } +} + .inputbox-style { resize: none; padding-left: 36px; diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index c5eed6d8..2641a8f8 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -275,7 +275,7 @@ function Upload({ } else setRedditData({ ...redditData, - [name]: value, + [name]: name === 'number_posts' ? parseInt(value) : value, }); }; @@ -321,6 +321,7 @@ function Upload({ colorVariant="gray" value={docName} onChange={(e) => setDocName(e.target.value)} + borderVariant="thin" >