Skip to content

Commit 874f877

Browse files
committed
2.0 beta
1 parent eacb240 commit 874f877

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

components/ChatList.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const md: MarkdownIt = markdownit({
2727
<USkeleton class="loading-item"/>
2828
</template>
2929
<template v-else>
30-
<li v-if="i.type==='text'" class="chat-item slide-top prose"
30+
<li v-if="i.type==='text'||i.type==='image-prompt'" class="chat-item slide-top prose"
3131
:class="[i.role==='user'?'send':'reply-text', index+1===history.length && loading ? 'loading':'' ]"
3232
v-html="i.role === 'user'? i.content: md.render(i.content)"/>
3333
<li v-else-if="i.type === 'image'">

pages/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async function handleSend(input: string, addHistory: boolean) {
121121
session,
122122
role: 'user',
123123
content: input,
124-
type: 'text'
124+
type: type === 'chat' ? 'text' : 'image-prompt'
125125
} as HistoryItem
126126
const id = await DB.history.add(historyItem) as number
127127
history.value.push({

utils/db.ts

+5
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ export const imageGenModels: Model[] = [{
133133
name: 'stable-diffusion-xl-base-1.0',
134134
provider: 'workers-ai-image',
135135
type: 'text-to-image'
136+
}, {
137+
id: '@cf/bytedance/stable-diffusion-xl-lightning',
138+
name: 'stable-diffusion-xl-lightning',
139+
provider: 'workers-ai-image',
140+
type: 'text-to-image'
136141
}]
137142

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

0 commit comments

Comments
 (0)