feat: add NSFW script generation feature and Grok API configuration
This commit is contained in:
@@ -78,6 +78,26 @@ export interface LLMConfig {
|
||||
has_key: boolean
|
||||
}
|
||||
|
||||
export interface NsfwSynopsisGenerationRequest {
|
||||
genre: string
|
||||
subgenre?: string
|
||||
protagonist_type?: string
|
||||
tone?: string
|
||||
conflict_scale?: string
|
||||
num_characters?: number
|
||||
num_chapters?: number
|
||||
}
|
||||
|
||||
export interface NsfwScriptGenerationRequest {
|
||||
title: string
|
||||
genre: string
|
||||
subgenre?: string
|
||||
premise: string
|
||||
style?: string
|
||||
num_characters?: number
|
||||
num_chapters?: number
|
||||
}
|
||||
|
||||
export const audiobookApi = {
|
||||
generateSynopsis: async (data: SynopsisGenerationRequest): Promise<string> => {
|
||||
const response = await apiClient.post<{ synopsis: string }>('/audiobook/projects/generate-synopsis', data)
|
||||
@@ -89,6 +109,16 @@ export const audiobookApi = {
|
||||
return response.data
|
||||
},
|
||||
|
||||
generateNsfwSynopsis: async (data: NsfwSynopsisGenerationRequest): Promise<string> => {
|
||||
const response = await apiClient.post<{ synopsis: string }>('/audiobook/projects/generate-synopsis-nsfw', data)
|
||||
return response.data.synopsis
|
||||
},
|
||||
|
||||
createNsfwScript: async (data: NsfwScriptGenerationRequest): Promise<AudiobookProject> => {
|
||||
const response = await apiClient.post<AudiobookProject>('/audiobook/projects/generate-script-nsfw', data)
|
||||
return response.data
|
||||
},
|
||||
|
||||
createProject: async (data: {
|
||||
title: string
|
||||
source_type: string
|
||||
|
||||
Reference in New Issue
Block a user