Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow UseUserSettingRequest Hooks

From Leeroopedia
Knowledge Sources
Domains Frontend, React_Hooks, User_Settings
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete React Query hooks for user settings operations including profile management, LLM provider configuration, and system model settings in the RAGFlow frontend.

Description

The use-user-setting-request.tsx module provides hooks for: fetching user profile and tenant info, updating user settings, managing LLM API keys, configuring system model defaults, and handling tenant-level configuration. These hooks power the entire user settings page.

Usage

Import these hooks in user settings pages, profile management views, and LLM provider configuration forms.

Code Reference

Source Location

Signature

export function useFetchUserInfo(): UseQueryResult;
export function useUpdateUserSetting(): UseMutationResult;
export function useSaveLlmApiKey(): UseMutationResult;
export function useSetSystemModel(): UseMutationResult;
export function useFetchTenantInfo(): UseQueryResult;

Import

import { useFetchUserInfo, useSaveLlmApiKey } from '@/hooks/use-user-setting-request';

I/O Contract

Inputs

Name Type Required Description
Hooks consume auth context internally

Outputs

Name Type Description
useFetchUserInfo() UseQueryResult User profile and settings data
useSaveLlmApiKey() UseMutationResult LLM API key save mutation

Usage Examples

import { useFetchUserInfo, useUpdateUserSetting } from '@/hooks/use-user-setting-request';

function ProfilePage() {
  const { data: userInfo } = useFetchUserInfo();
  const { mutate: updateSettings } = useUpdateUserSetting();
  // ...
}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment