IntelliClass_FE/api/aifn.ts
HoshinoSuzumi 20471bfbe3
Some checks failed
CI / lint (push) Failing after 59s
CI / test (push) Failing after 47s
feat: 完成 AIGC Conversation 组件
2025-04-26 21:54:10 +08:00

27 lines
604 B
TypeScript

import type { IResponse } from '.'
import type { AIGeneratedContent } from '~/components/ai'
export type AIGeneratedContentResponse = IResponse<{
data: AIGeneratedContent & {
raw: string
}
}>
export const generateLessonPlan = async (params: {
query: string
}) => {
return await http<AIGeneratedContentResponse>(`/ai/lesson-plan-design/text-block`, {
method: 'POST',
body: params,
})
}
export const generateCase = async (params: {
query: string
}) => {
return await http<AIGeneratedContentResponse>(`/ai/case-design/text-block`, {
method: 'POST',
body: params,
})
}