forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

postPodcastJob.ts22 lines, 859 bytesHistoryRawDownload
1import { client } from "../client";
2import type { PodcastFormat, PodcastJobReceipt } from "../client";
3
4export type PostPodcastJobBody = {
5 /** A course note's id, never a path — the backend resolves the source. */
6 source_id: string;
7 /**
8 * Omit for the service's default (`duz_okuma`). `tek_ogretici` and
9 * `ogrenci_hoca` need the service's LLM key and are refused with
10 * 409 `llm_unavailable` without it.
11 */
12 format?: PodcastFormat;
13};
14
15/**
16 * 202 the moment the service accepts the job — the pipeline then runs in its
17 * own worker pool, so poll `getPodcastJobById` for progress. 503 when no
18 * service offers the podcast capability, and then nothing was queued.
19 */
20export function postPodcastJob(body: PostPodcastJobBody): Promise<PodcastJobReceipt> {
21 return client<PodcastJobReceipt>("/podcast/jobs", { method: "POST", body });
22}