Skip to content

Commit b4bc819

Browse files
authored
feat: basic ai playground
1 parent d54d9a6 commit b4bc819

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

playground/nuxt.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default defineNuxtConfig({
1010
module
1111
],
1212
hub: {
13+
ai: true,
1314
database: true,
1415
kv: true,
1516
blob: true,

playground/server/api/ai.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default defineEventHandler(async () => {
2+
const ai = hubAi()
3+
return await ai.run('@cf/meta/llama-2-7b-chat-int8', {
4+
prompt: 'Who is the author of Nuxt?'
5+
})
6+
})

0 commit comments

Comments
 (0)