Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
Duplicated from
huggingchat/chat-ui
SoSa123456
/
chat-ui
like
0
Build error
App
Files
Files
Community
12c3a5a
chat-ui
/
src
/
lib
/
utils
/
models.ts
Adrien Denat
Models selector (#164)
2606dde
unverified
over 1 year ago
raw
Copy download link
history
blame
Safe
167 Bytes
import
type
{
Model
}
from
"$lib/types/Model"
;
export
const
findCurrentModel
= (
models: Model[], name?:
string
) =>
models.
find
(
(
m
) =>
m.
name
=== name) ?? models[
0
];