Download packages/agent-core-v2/src/agent/tokenCounting/tokenCounting.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 486 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/tokenCounting/tokenCounting.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/agent/tokenCounting/tokenCounting.ts
-
curl -L -o tokenCounting.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/tokenCounting/tokenCounting.ts
486 Bytes
| import type { Message } from '#/llm-adapter/contract/message'; | |
| import type { ToolDescription as Tool } from '#human/llm/message'; | |
| export type TokenCountingStrategy = 'measured+estimated' | 'measured' | 'estimated'; | |
| export interface ContextSize { | |
| readonly size: number; | |
| readonly measured: number; | |
| readonly estimated: number; | |
| } | |
| export interface TokenCountingRequest { | |
| readonly systemPrompt: string; | |
| readonly tools: readonly Tool[]; | |
| readonly messages: readonly Message[]; | |
| } | |