| 1322 | | 1322 | |
| 1323 | const modelOptions = models | 1323 | const modelOptions = models |
| 1324 | .sort((a, b) => a.title.localeCompare(b.title)) | 1324 | .sort((a, b) => a.title.localeCompare(b.title)) |
| 1325 | .map(x => ({ value: x.modelUrl.split('fal-ai/')[1], text: x.title })); | 1325 | .map(x => ({ value: x.modelUrl.split('fal-ai/')[1], text: x.title })) |
| | 1326 | .map(x => ({ ...x, text: `${x.text} (${x.value})` })); |
| 1326 | return response.send(modelOptions); | 1327 | return response.send(modelOptions); |
| 1327 | } catch (error) { | 1328 | } catch (error) { |
| 1328 | console.error(error); | 1329 | console.error(error); |