chat-ui / src /lib /utils /models.ts
Adrien Denat
Models selector (#164)
2606dde unverified
raw
history blame
167 Bytes
import type { Model } from "$lib/types/Model";
export const findCurrentModel = (models: Model[], name?: string) =>
models.find((m) => m.name === name) ?? models[0];