feat(simulations): getIdees API + hook useIdees (G5)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
555dac17e2
commit
67eb3411c5
2 changed files with 48 additions and 0 deletions
|
|
@ -42,3 +42,18 @@ export function correctEo(payload: CorrectEoPayload): Promise<Report> {
|
|||
timeoutMs: CORRECTION_TIMEOUT_MS,
|
||||
})
|
||||
}
|
||||
|
||||
const IDEES_TIMEOUT_MS = 15_000
|
||||
|
||||
/**
|
||||
* Récupère 5 suggestions d'idées DeepSeek pour prolonger la rédaction en cours.
|
||||
* Endpoint : `POST /sujets/idees`. Tâche G5.
|
||||
* Contraintes backend : sujet_consigne non vide + contenu_partiel ≥ 30 mots.
|
||||
*/
|
||||
export function getIdees(consigne: string, contenu: string): Promise<string[]> {
|
||||
return apiFetch<{ idees: string[] }>('/sujets/idees', {
|
||||
method: 'POST',
|
||||
body: { sujet_consigne: consigne, contenu_partiel: contenu },
|
||||
timeoutMs: IDEES_TIMEOUT_MS,
|
||||
}).then((res) => res.idees)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue