Spaces:
MasterDee
/
Paused

Adrien Denat Eliott C. commited on
Commit
b7b2c8c
·
unverified ·
1 Parent(s): 2e28042

Disable models (#187)

Browse files

* add ability for a model to be disabled

* fallback to default model if user has invalid/disabled model in settings

* set conversations to read-only if conv model is disabled

* add better disabled state on chat input

* fix inverted if statement

* remove bigcode from .env

* fix not updating settings

Co-authored-by: Eliott C. <coyotte508@gmail.com>

* refactor solution to use an OLD_MODELS env var instead

* OLD_MODELS needs to be in .env but can be empty

* fix typing issue + typo

* refactor models validation

* old models displayName is optional

* set read only prop on user message not assistant messages

* remove console.log

* ♻️ Refacto isReadOnly

* 🩹 Fluff: use 410 http code

---------

Co-authored-by: Eliott C. <coyotte508@gmail.com>

15 files changed +84 -84
Files changed (15)
.env+1-30
src/lib/buildPrompt.ts+7-1
src/lib/components/chat/ChatIntroduction.svelte+8-15
src/lib/components/chat/ChatMessage.svelte+12-9
src/lib/components/chat/ChatMessages.svelte+4-4
src/lib/components/chat/ChatWindow.svelte+8-4
src/lib/server/models.ts+22-2
src/lib/utils/models.ts+2-8
src/routes/+layout.server.ts+11-2
src/routes/+page.svelte+1-1
src/routes/conversation/+server.ts+1-2
src/routes/conversation/[id]/+page.svelte+2-1
src/routes/conversation/[id]/+server.ts+3-3
src/routes/r/[id]/+page.svelte+1
src/routes/settings/+page.server.ts+1-2