feat(web): add generateJoke API function
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
import request from './request'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用 AI 生成笑话
|
||||||
|
* @param {string[]} keywords - 关键词列表
|
||||||
|
* @param {string[]} scenarios - 场景列表
|
||||||
|
* @returns {Promise<{title: string, content: string, created_at: string}>}
|
||||||
|
*/
|
||||||
|
export const generateJoke = (keywords = [], scenarios = []) => {
|
||||||
|
return request.post('/generate', {
|
||||||
|
keywords,
|
||||||
|
scenarios
|
||||||
|
})
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user