Skip to content

Commit

Permalink
2.0 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazee6 committed Mar 30, 2024
1 parent eacb240 commit 874f877
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/ChatList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const md: MarkdownIt = markdownit({
<USkeleton class="loading-item"/>
</template>
<template v-else>
<li v-if="i.type==='text'" class="chat-item slide-top prose"
<li v-if="i.type==='text'||i.type==='image-prompt'" class="chat-item slide-top prose"
:class="[i.role==='user'?'send':'reply-text', index+1===history.length && loading ? 'loading':'' ]"
v-html="i.role === 'user'? i.content: md.render(i.content)"/>
<li v-else-if="i.type === 'image'">
Expand Down
2 changes: 1 addition & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async function handleSend(input: string, addHistory: boolean) {
session,
role: 'user',
content: input,
type: 'text'
type: type === 'chat' ? 'text' : 'image-prompt'
} as HistoryItem
const id = await DB.history.add(historyItem) as number
history.value.push({
Expand Down
5 changes: 5 additions & 0 deletions utils/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ export const imageGenModels: Model[] = [{
name: 'stable-diffusion-xl-base-1.0',
provider: 'workers-ai-image',
type: 'text-to-image'
}, {
id: '@cf/bytedance/stable-diffusion-xl-lightning',
name: 'stable-diffusion-xl-lightning',
provider: 'workers-ai-image',
type: 'text-to-image'
}]

export const models: Model[] = [...textGenModels, ...imageGenModels]

0 comments on commit 874f877

Please sign in to comment.