This commit is contained in:
team3
2026-06-29 17:11:23 +02:00
parent 87fc9b209a
commit 12f97031e8
7 changed files with 330 additions and 38 deletions

View File

@@ -47,11 +47,20 @@ export async function fetchBausteineStatus(topic) {
return res.json()
}
export async function createBausteine(topic, instructions = '', provider = 'claude', sourceType = 'thema', sourceOrt = '', abPhase = null) {
export async function createBausteine(topic, instructions = '', provider = 'claude', sourceType = 'thema', sourceOrt = '', abPhase = null, abStep = null) {
const res = await fetch(`${BASE}/bausteine`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ topic, instructions, provider, source_type: sourceType, source_ort: sourceOrt, ab_phase: abPhase }),
body: JSON.stringify({ topic, instructions, provider, source_type: sourceType, source_ort: sourceOrt, ab_phase: abPhase, ab_step: abStep }),
})
return jsonOrThrow(res)
}
export async function resetBausteineAbStep(topic, abStep) {
const res = await fetch(`${BASE}/bausteine/reset-step`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ topic, ab_step: abStep }),
})
return jsonOrThrow(res)
}