docs(metrics): clarify projection and latency contracts
This commit is contained in:
@@ -2323,7 +2323,7 @@ measure(session: Session, requestHeader?: EpochHeader): TokenMeasurement
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Heuristically price one model-visible message (instance face of the pure
|
* Heuristically price one model-visible message (instance face of the pure
|
||||||
* {@link estimateMessage}).
|
* `estimateMessage` export from `estimate.ts`).
|
||||||
* @param message - message to price without mutation.
|
* @param message - message to price without mutation.
|
||||||
* @returns content and role-framing tokens under the fixed service heuristic.
|
* @returns content and role-framing tokens under the fixed service heuristic.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||||
# after editing either side, bring the other along and re-record with:
|
# after editing either side, bring the other along and re-record with:
|
||||||
# pnpm run verify-translation-pairing --write docs/core-data-structures/session.md
|
# pnpm run verify-translation-pairing --write docs/core-data-structures/session.md
|
||||||
session.md: 39fe66b43d8bb7ada0daeaca4fecc6a472b4bdf4
|
session.md: 6743f26822eeb57dee6e6040224617f6e96aa69d
|
||||||
session.zh.md: 67faecc6e1262a69ff078220a4a15b5103b7de20
|
session.zh.md: b717b84469a93aa2359a46124a6703dd57fb24ce
|
||||||
|
|||||||
@@ -484,8 +484,8 @@ declare class Session {
|
|||||||
*/
|
*/
|
||||||
deriveMessages(): Message[];
|
deriveMessages(): Message[];
|
||||||
/**
|
/**
|
||||||
* Instance face of the pure per-node projection rule
|
* Instance face of the pure per-node `deriveEventMessage` export from
|
||||||
* {@link deriveEventMessage} (see its contract in `surface.ts`).
|
* `surface.ts`.
|
||||||
* @param event - the event to project.
|
* @param event - the event to project.
|
||||||
* @returns the derived message, or null when the event produces none.
|
* @returns the derived message, or null when the event produces none.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -486,8 +486,8 @@ declare class Session {
|
|||||||
*/
|
*/
|
||||||
deriveMessages(): Message[];
|
deriveMessages(): Message[];
|
||||||
/**
|
/**
|
||||||
* Instance face of the pure per-node projection rule
|
* Instance face of the pure per-node `deriveEventMessage` export from
|
||||||
* {@link deriveEventMessage} (see its contract in `surface.ts`).
|
* `surface.ts`.
|
||||||
* @param event - the event to project.
|
* @param event - the event to project.
|
||||||
* @returns the derived message, or null when the event produces none.
|
* @returns the derived message, or null when the event produces none.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ interface TurnFold {
|
|||||||
/**
|
/**
|
||||||
* Fold assistant nodes into per-turn footer metrics.
|
* Fold assistant nodes into per-turn footer metrics.
|
||||||
*
|
*
|
||||||
* TTFT is the turn's lowest-step reading — the user-perceived wait before
|
* TTFT is the turn's lowest-step request-dispatch-to-first-token reading, so
|
||||||
* output appeared — so it is only meaningful when the turn's start is inside
|
* it is only meaningful when the turn's start is inside
|
||||||
* the loaded window (the caller gates on `turnTimings`, which shares that
|
* the loaded window (the caller gates on `turnTimings`, which shares that
|
||||||
* window). Throughput divides summed output tokens by summed decode wall time,
|
* window). Throughput divides summed output tokens by summed decode wall time,
|
||||||
* counting only steps that carry both.
|
* counting only steps that carry both.
|
||||||
|
|||||||
@@ -1040,7 +1040,7 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
signature: 'estimateMessage(message: Message): number',
|
signature: 'estimateMessage(message: Message): number',
|
||||||
jsDoc: '/**\n * Heuristically price one model-visible message (instance face of the pure\n * {@link estimateMessage}).\n * @param message - message to price without mutation.\n * @returns content and role-framing tokens under the fixed service heuristic.\n */',
|
jsDoc: '/**\n * Heuristically price one model-visible message (instance face of the pure\n * `estimateMessage` export from `estimate.ts`).\n * @param message - message to price without mutation.\n * @returns content and role-framing tokens under the fixed service heuristic.\n */',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -685,8 +685,8 @@ export class Session {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instance face of the pure per-node projection rule
|
* Instance face of the pure per-node `deriveEventMessage` export from
|
||||||
* {@link deriveEventMessage} (see its contract in `surface.ts`).
|
* `surface.ts`.
|
||||||
* @param event - the event to project.
|
* @param event - the event to project.
|
||||||
* @returns the derived message, or null when the event produces none.
|
* @returns the derived message, or null when the event produces none.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ export class TokenMeterService extends Service {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Heuristically price one model-visible message (instance face of the pure
|
* Heuristically price one model-visible message (instance face of the pure
|
||||||
* {@link estimateMessage}).
|
* `estimateMessage` export from `estimate.ts`).
|
||||||
* @param message - message to price without mutation.
|
* @param message - message to price without mutation.
|
||||||
* @returns content and role-framing tokens under the fixed service heuristic.
|
* @returns content and role-framing tokens under the fixed service heuristic.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user