sdk: fixup clusterWorkerId to be optional

This commit is contained in:
Koushik Dutta
2024-11-26 09:02:01 -08:00
parent ed498ae418
commit e799ada9c9
2 changed files with 4 additions and 1 deletions

View File

@@ -687,6 +687,7 @@ class ObjectDetectionGeneratorResult(TypedDict):
class ObjectDetectionGeneratorSession(TypedDict):
clusterWorkerId: str
settings: Any
sourceId: str
zones: list[ObjectDetectionZone]
@@ -705,6 +706,7 @@ class ObjectDetectionModel(TypedDict):
class ObjectDetectionSession(TypedDict):
batch: float # Denotes that this is the first sample in a batch of samples.
clusterWorkerId: str
settings: Any
sourceId: str
zones: list[ObjectDetectionZone]

View File

@@ -1603,6 +1603,7 @@ export interface ObjectDetectionGeneratorSession {
zones?: ObjectDetectionZone[];
settings?: { [key: string]: any };
sourceId?: string;
clusterWorkerId?: ForkOptions['clusterWorkerId'];
}
export interface ObjectDetectionSession extends ObjectDetectionGeneratorSession {
/**
@@ -1683,7 +1684,7 @@ export interface VideoFrameGeneratorOptions extends ImageOptions {
queue?: number;
fps?: number;
firstFrameOnly?: boolean;
clusterWorkerId: ForkOptions['clusterWorkerId'];
clusterWorkerId?: ForkOptions['clusterWorkerId'];
}
export interface VideoFrameGenerator {
generateVideoFrames(mediaObject: MediaObject, options?: VideoFrameGeneratorOptions): Promise<AsyncGenerator<VideoFrame, void>>;