@agenticforge/utils
v1.1.5
Published
Utility helpers for AgenticFORGE
Maintainers
Readme
@agenticforge/utils
AgenticFORGE 通用工具包,提供 LRU 缓存、Prompt 工具等基础设施。
安装
npm install @agenticforge/utils主要导出
| 名称 | 说明 |
|------|------|
| LRUCache | 高性能 LRU 缓存,用于工具结果、嵌入向量等缓存场景 |
| Prompt | Prompt 模板工具,支持变量插值 |
使用示例
import {LRUCache} from "@agenticforge/utils";
const cache = new LRUCache<string, string>({maxSize: 100});
cache.set("key1", "value1");
const val = cache.get("key1");
console.log(val); // "value1"