This commit is contained in:
parent
501b249a7c
commit
8d8b704a73
|
|
@ -21,10 +21,12 @@ import { Button } from "../ui/button"
|
|||
import { FilePreview } from "../ui/file-preview"
|
||||
import { WithTooltip } from "../ui/with-tooltip"
|
||||
import { ChatRetrievalSettings } from "./chat-retrieval-settings"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
interface ChatFilesDisplayProps {}
|
||||
|
||||
export const ChatFilesDisplay: FC<ChatFilesDisplayProps> = ({}) => {
|
||||
const { t } = useTranslation()
|
||||
useHotkey("f", () => setShowFilesDisplay(prev => !prev))
|
||||
useHotkey("e", () => setUseRetrieval(prev => !prev))
|
||||
|
||||
|
|
@ -253,6 +255,7 @@ export const ChatFilesDisplay: FC<ChatFilesDisplayProps> = ({}) => {
|
|||
}
|
||||
|
||||
const RetrievalToggle = ({}) => {
|
||||
const { t } = useTranslation()
|
||||
const { useRetrieval, setUseRetrieval } = useContext(ChatbotUIContext)
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -11,10 +11,14 @@ import {
|
|||
import { Label } from "../ui/label"
|
||||
import { Slider } from "../ui/slider"
|
||||
import { WithTooltip } from "../ui/with-tooltip"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
interface ChatRetrievalSettingsProps {}
|
||||
|
||||
export const ChatRetrievalSettings: FC<ChatRetrievalSettingsProps> = ({}) => {
|
||||
|
||||
const { t } = useTranslation()
|
||||
|
||||
const { sourceCount, setSourceCount } = useContext(ChatbotUIContext)
|
||||
|
||||
const [isOpen, setIsOpen] = useState(false)
|
||||
|
|
|
|||
Loading…
Reference in New Issue