27 lines
604 B
TypeScript
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,
|
|
})
|
|
}
|