Update import statements, set TTSEnabled in TTSModeSettings, and fix fetchChatModels error handling

This commit is contained in:
n4ze3m
2024-04-13 14:25:09 +05:30
parent a3810cd534
commit 9262a5bb7c
6 changed files with 24 additions and 17 deletions

View File

@@ -4,7 +4,7 @@ import { useLocation, NavLink } from "react-router-dom"
import { Sidebar } from "../Option/Sidebar"
import { Drawer, Select, Tooltip } from "antd"
import { useQuery } from "@tanstack/react-query"
import { getAllModels } from "~/services/ollama"
import { fetchChatModels, getAllModels } from "~/services/ollama"
import { useMessageOption } from "~/hooks/useMessageOption"
import {
ChevronLeft,
@@ -46,7 +46,7 @@ export default function OptionLayout({
isFetching: isModelsFetching
} = useQuery({
queryKey: ["fetchModel"],
queryFn: () => getAllModels({ returnEmpty: true }),
queryFn: () => fetchChatModels({ returnEmpty: true }),
refetchInterval: 15000
})