-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontext7.json
More file actions
39 lines (39 loc) · 3.14 KB
/
Copy pathcontext7.json
File metadata and controls
39 lines (39 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
"$schema": "https://context7.com/schema/context7.json",
"url": "https://context7.com/webba-creative-technologies/capslane-python",
"public_key": "pk_RscJhHDbcgalNc0kEFuzf",
"projectTitle": "Capslane YouTube Transcript API for Python",
"description": "Official Capslane Python SDK for YouTube transcripts and generated jobs. The optional LangChain loader creates Documents with timestamp citations. The base client has no runtime dependencies.",
"branch": "main",
"folders": [
"docs"
],
"excludeFolders": [
".github",
"src",
"test",
"tests",
"dist",
".venv",
"__pycache__",
"_autodocs"
],
"excludeFiles": [
"LICENSE",
"CHANGELOG.md"
],
"rules": [
"Read docs/http-contract.md for the maintained HTTP response contract and docs/client.md for SDK signatures. Completed job content is a segment array and requestId is required. A completed status without content can mean the stored result expired.",
"For LangChain, install capslane[langchain]>=0.2.0 and import CapslaneLoader from capslane.langchain. It defaults to native and preserves timestamp citations. Read docs/langchain.md for local chunking, job_id recovery and the keyword retrieval example.",
"Only transcript url is required. mode is optional, accepts native, auto or generate, and defaults to auto. The content value is a list of segment dictionaries by default and a string only for an immediate text=True result.",
"Install capslane and import CapslaneClient and CapslaneError from capslane. Keep CAPSLANE_API_KEY in the server environment, outside prompts and source control. Python 3.10 or later is required.",
"Check for content before jobId. A completed job contains both. Use wait_for_transcript for accepted jobs and preserve their ID so polling can resume without another submission.",
"Cache lookup happens before mode selection. On a cache miss, native never starts generation; auto falls back only after confirmed missing captions. Inspect source and cached in every result.",
"Use transcript_job to check an existing job once. HTTP 200 does not mean the job is complete; stop on failed or cancelled. Bound network calls and the polling window separately with their timeout arguments.",
"Completed jobs return canonical timestamped segments. text and chunk_size affect immediate results only. Join segment text locally when plain text is required after polling.",
"Segment offset and duration values are milliseconds. lang is a preferred caption language, not a translation request.",
"A transcript submission reserves a monthly unit before cache lookup. Cache hits and later failures can consume it. Polling an existing job does not reserve another transcript unit.",
"Read CapslaneError.code before retrying. Use bounded backoff for temporary failures. Monthly allowance errors need a reset or allowance change. Client cancellation does not cancel an accepted server job.",
"wait_for_transcript(job, *, interval=2.0, timeout=1200) uses seconds. timeout=None is unsupported. The client network timeout defaults to 20 seconds. A valid unknown job returns job_not_found; local polling expiry uses processing_timeout."
]
}