huoshan/ai_test.js

25 lines
746 B
JavaScript
Raw Normal View History

2024-10-31 15:31:37 +08:00
import co from 'apigo.cc/gojs/console'
import ai from 'apigo.cc/ai'
let r = ai.huoshan.fastAsk('用一句话为你的主人写一段生成在山顶喝咖啡的图片的提示词', co.print, {
systemPrompt: '你的主人很美丽,喜欢戴帽子'
})
co.println()
co.info('生成的提示词:', r.result)
let r2 = ai.huoshan.makeImage({
prompt: r.result,
systemPrompt: '3D卡通高清4K',
width: 1280,
height: 720,
})
co.info('生成的图片:', r2.results[0])
let r3 = ai.huoshan.makeImageKeepIP({
prompt: '女孩,骑马在草原上狂奔,天上的云朵,有太阳,有小鸟',
width: 1280,
height: 720,
ref: [r2.results[0]],
})
co.info('生成角色一致的图片:', r3.results[0])