mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-21 23:46:50 +00:00
feat: support dynamic loading models
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { loadModels } from "./api";
|
||||
|
||||
export function useModels() {
|
||||
const { data, isLoading, error } = useQuery({
|
||||
queryKey: ["models"],
|
||||
queryFn: () => loadModels(),
|
||||
});
|
||||
return { models: data ?? [], isLoading, error };
|
||||
}
|
||||
Reference in New Issue
Block a user