Spaces:
Sleeping
Sleeping
Download src/interfaces/core/IAggregationCounterAPI.ts from lamsaoganh/teamta: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/spaces/lamsaoganh/teamta/resolve/main/src/interfaces/core/IAggregationCounterAPI.ts
- Command line
-
hf download hf://spaces/lamsaoganh/teamta/src/interfaces/core/IAggregationCounterAPI.ts
-
curl -L -o IAggregationCounterAPI.ts https://huggingface.co/spaces/lamsaoganh/teamta/resolve/main/src/interfaces/core/IAggregationCounterAPI.ts
1.06 kB
| import { IAggregationCounter } from './IAggregationCounter'; | |
| import { AggregationCounterRef } from './IMessage'; | |
| export interface IAggregationCounterAPI { | |
| // Tạo counter mới | |
| createCounter(params: { | |
| requestId: string; | |
| stepId: string; | |
| targetMessageType: string; | |
| expectedCount: number; | |
| timeoutMs?: number; | |
| parentResults?: any; | |
| delayMs?: number; | |
| targetMessageAggregationCounters?: AggregationCounterRef[]; | |
| }): Promise<IAggregationCounter>; | |
| // Increment counter | |
| incrementCounter(params: { | |
| aggregationKey: string; | |
| taskType: string; | |
| result: any; | |
| workerId?: string; | |
| messageId?: string; // ID của message đã hoàn thành | |
| }): Promise<{ | |
| counter: IAggregationCounter | null; | |
| isComplete: boolean; | |
| messageCreated?: boolean; | |
| }>; | |
| // Lấy counter theo key | |
| getCounterByKey(aggregationKey: string): Promise<IAggregationCounter | null>; | |
| // Lấy counters theo requestId | |
| getCountersByRequestId(requestId: string): Promise<IAggregationCounter[]>; | |
| } |