From ec91289c0cd106169857d876da1ba2817dc9ec46 Mon Sep 17 00:00:00 2001 From: ItzCrazyKns Date: Sun, 21 Apr 2024 16:22:27 +0530 Subject: [PATCH] feat(messageSources): use arrow functions --- README.md | 4 ++-- ui/components/MessageSources.tsx | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7bcb2b1..9b646ee 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ There are mainly 2 ways of installing Perplexica - With Docker, Without Docker. - `OPENAI`: Your OpenAI API key. **You only need to fill this if you wish to use OpenAI's models.** - `OLLAMA`: Your Ollama API URL. **You need to fill this if you wish to use Ollama's models instead of OpenAI's.** - **Note**: (In development) You can change these and use different models after running Perplexica as well from the settings page. + **Note**: (In development) You can change these and use different models after running Perplexica as well from the settings page. - `SIMILARITY_MEASURE`: The similarity measure to use (This is filled by default; you can leave it as is if you are unsure about it.) @@ -90,7 +90,7 @@ For setups without Docker: ## Upcoming Features - [ ] Finalizing Copilot Mode -- [X] Adding support for local LLMs +- [x] Adding support for local LLMs - [ ] Adding Discover and History Saving features - [x] Introducing various Focus Modes diff --git a/ui/components/MessageSources.tsx b/ui/components/MessageSources.tsx index 8c78f2f..5816f8d 100644 --- a/ui/components/MessageSources.tsx +++ b/ui/components/MessageSources.tsx @@ -1,21 +1,20 @@ /* eslint-disable @next/next/no-img-element */ -import { cn } from '@/lib/utils'; import { Dialog, Transition } from '@headlessui/react'; import { Document } from '@langchain/core/documents'; -import Link from 'next/link'; import { Fragment, useState } from 'react'; const MessageSources = ({ sources }: { sources: Document[] }) => { const [isDialogOpen, setIsDialogOpen] = useState(false); - function closeModal() { + + const closeModal = () => { setIsDialogOpen(false); document.body.classList.remove('overflow-hidden-scrollable'); - } + }; - function openModal() { + const openModal = () => { setIsDialogOpen(true); document.body.classList.add('overflow-hidden-scrollable'); - } + }; return (