import { IModelData } from '@/types/model'; import { MODEL_ICON_MAP } from '@/utils'; import moment from 'moment'; import GptCard from '../common/gpt-card'; interface Props { info: IModelData; } function ModelCard({ info }: Props) { // const { t } = useTranslation(); // const [loading, setLoading] = useState(false); // TODO:unused function // async function stopTheModel(info: IModelData) { // if (loading) { // return; // } // setLoading(true); // const [, res] = await apiInterceptors( // stopModel({ // host: info.host, // port: info.port, // model: info.model_name, // worker_type: info.model_type, // params: {}, // }), // ); // setLoading(false); // if (res === true) { // message.success(t('stop_model_success')); // } // } return ( // // Stop Model // // ), // onClick: () => { // stopTheModel(info); // }, // }, // ]} >

Host:

{info.host}

Manage Host:

{info.manager_host}:{info.manager_port}

Last Heart Beat:

{moment(info.last_heartbeat).format('YYYY-MM-DD')}

); } export default ModelCard;