MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / loadModels

Function loadModels

web/src/components/settings/PersonalSetting.js:187–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185 };
186
187 const loadModels = async () => {
188 setModelsLoading(true);
189
190 try {
191 let res = await API.get(`/api/user/models`);
192 const { success, message, data } = res.data;
193
194 if (success) {
195 if (data != null) {
196 setModels(data);
197 }
198 } else {
199 showError(message);
200 }
201 } catch (error) {
202 showError(t('加载模型列表失败'));
203 } finally {
204 setModelsLoading(false);
205 }
206 };
207
208 const handleSystemTokenClick = async (e) => {
209 e.target.select();

Callers 1

PersonalSetting.jsFile · 0.70

Calls 2

showErrorFunction · 0.90
tFunction · 0.70

Tested by

no test coverage detected