DorkAI / src /lib /utils /models.ts
dorkai's picture
Duplicate from huggingchat/chat-ui
a9997f4
raw
history blame contribute delete
167 Bytes
import type { Model } from "$lib/types/Model";
export const findCurrentModel = (models: Model[], name?: string) =>
models.find((m) => m.name === name) ?? models[0];