Spaces:
Running
Running
File size: 704 Bytes
c0a9bce |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import { useCallback, useState } from 'react';
import type { IProviderConfig } from '~/types/model';
export interface UseLocalProvidersReturn {
localProviders: IProviderConfig[];
refreshLocalProviders: () => void;
}
export function useLocalProviders(): UseLocalProvidersReturn {
const [localProviders, setLocalProviders] = useState<IProviderConfig[]>([]);
const refreshLocalProviders = useCallback(() => {
/*
* Refresh logic for local providers
* This would typically involve checking the status of Ollama and LMStudio
* For now, we'll just return an empty array
*/
setLocalProviders([]);
}, []);
return {
localProviders,
refreshLocalProviders,
};
}
|