Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

520 B
Raw Blame
import { AgentDialogueMode, BeginId } from '../constant';
import useGraphStore from '../store';

export function useIsWebhookMode() {
  const getNode = useGraphStore((state) => state.getNode);

  const beginNode = getNode(BeginId);

  return beginNode?.data.form?.mode === AgentDialogueMode.Webhook;
}

export function useIsConversationMode() {
  const getNode = useGraphStore((state) => state.getNode);

  const beginNode = getNode(BeginId);

  return beginNode?.data.form?.mode === AgentDialogueMode.Conversational;
}