Spaces:
Paused
Paused
Download src/lib/utils/models.ts from Mike0021/chat-ui-agent-demo: direct link, hf CLI and curl.
- Browser
- Download file 300 Bytes
-
https://huggingface.co/spaces/Mike0021/chat-ui-agent-demo/resolve/main/src/lib/utils/models.ts
- Command line
-
hf download hf://spaces/Mike0021/chat-ui-agent-demo/src/lib/utils/models.ts
-
curl -L -o models.ts https://huggingface.co/spaces/Mike0021/chat-ui-agent-demo/resolve/main/src/lib/utils/models.ts
300 Bytes
| import type { Model } from "$lib/types/Model"; | |
| export const findCurrentModel = ( | |
| models: Model[], | |
| _oldModels: { id: string; transferTo?: string }[] = [], | |
| id?: string | |
| ): Model => { | |
| if (id) { | |
| const direct = models.find((m) => m.id === id); | |
| if (direct) return direct; | |
| } | |
| return models[0]; | |
| }; | |