mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 13:23:15 +00:00
Add a ride hand side bar for chat controls
This commit is contained in:
@@ -33,6 +33,8 @@ export function useAuthenticatedData() {
|
||||
export interface ModelOptions {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
strengths: string;
|
||||
}
|
||||
export interface SyncedContent {
|
||||
computer: boolean;
|
||||
@@ -99,6 +101,14 @@ export function useUserConfig(detailed: boolean = false) {
|
||||
return { userConfig, isLoadingUserConfig };
|
||||
}
|
||||
|
||||
export function useChatModelOptions() {
|
||||
const { data, error, isLoading } = useSWR<ModelOptions[]>(`/api/model/chat/options`, fetcher, {
|
||||
revalidateOnFocus: false,
|
||||
});
|
||||
|
||||
return { models: data, error, isLoading };
|
||||
}
|
||||
|
||||
export function isUserSubscribed(userConfig: UserConfig | null): boolean {
|
||||
return (
|
||||
(userConfig?.subscription_state &&
|
||||
|
||||
Reference in New Issue
Block a user