UNPKG

@llamaindex/ui

Version:

A comprehensive UI component library built with React, TypeScript, and Tailwind CSS for LlamaIndex applications

31 lines (24 loc) 926 B
import { getPipelineApiV1PipelinesPipelineIdGet } from 'llama-cloud-services/api'; type Pipeline = NonNullable<Awaited<ReturnType<typeof getPipelineApiV1PipelinesPipelineIdGet>>["data"]>; interface UseIndexListResult { indexes: Pipeline[]; loading: boolean; error: string | null; sync: () => Promise<void>; } declare function useIndexList(): UseIndexListResult; interface UseIndexResult { index: Pipeline | null; loading: boolean; error: string | null; refresh: () => Promise<void>; } declare function useIndex(id: string): UseIndexResult; interface IndexStoreState { indexes: Record<string, Pipeline>; sync(): Promise<void>; refresh(id: string): Promise<void>; } declare function useIndexStore(): IndexStoreState; declare function useIndexStore<T>(selector: (state: IndexStoreState) => T): T; export { type Pipeline as IndexPipeline, useIndex, useIndexList, useIndexStore };