pi-cache-optimizer 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -17
- package/README.zh-CN.md +2 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,25 +104,10 @@ This extension is pure Node.js — no shell exec, no native bindings, no platfor
|
|
|
104
104
|
|
|
105
105
|
State files under `~/.pi/agent/` are resolved via Node's `os.homedir()`, so on Windows the path automatically expands to `C:\Users\<you>\.pi\agent\...`. The extension's compat warnings, `/cache-optimizer doctor`, and `/cache-optimizer compat` show the platform-appropriate path automatically (`~/.pi/agent/models.json` on Linux/macOS, `%USERPROFILE%\.pi\agent\models.json` on Windows). All shell snippets in this README are bash, matching the shell Pi runs in on every supported platform; no PowerShell or `cmd.exe` translation is needed when commands are executed inside (or for) Pi.
|
|
106
106
|
|
|
107
|
-
## Quickstart
|
|
108
|
-
|
|
109
|
-
1. (Optional but recommended) Read the official Pi + DeepSeek onboarding guide: [`pi_mono.zh-CN.md`](https://github.com/deepseek-ai/awesome-deepseek-agent/blob/main/docs/pi_mono.zh-CN.md). It covers Pi installation and core configuration.
|
|
110
|
-
2. Install this extension:
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
pi install npm:pi-cache-optimizer
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
3. Export your DeepSeek API key in the same shell where you run `pi` (if you use a DeepSeek model):
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
export DEEPSEEK_API_KEY='...'
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
This extension never reads, stores, or prints the key value.
|
|
123
|
-
|
|
124
107
|
## Install
|
|
125
108
|
|
|
109
|
+
Install and configure Pi first, then install this extension:
|
|
110
|
+
|
|
126
111
|
```bash
|
|
127
112
|
pi install npm:pi-cache-optimizer
|
|
128
113
|
```
|
package/README.zh-CN.md
CHANGED
|
@@ -107,25 +107,10 @@ Generic OpenAI-compatible 代理**不会**仅因为使用 OpenAI 形状 API 或
|
|
|
107
107
|
|
|
108
108
|
状态文件 `~/.pi/agent/` 通过 Node 的 `os.homedir()` 解析,所以在 Windows 上会自动展开为 `C:\Users\<你>\.pi\agent\...`。扩展的 compat 提醒、`/cache-optimizer doctor` 和 `/cache-optimizer compat` 会自动显示适合当前平台的路径(Linux/macOS 上显示 `~/.pi/agent/models.json`,Windows 上显示 `%USERPROFILE%\.pi\agent\models.json`)。本文档中所有 shell 命令均使用 bash 语法,与 Pi 在每个受支持平台下运行的 shell 一致;只要在 Pi 内(或为 Pi 而执行)运行,就**不需要**改写为 PowerShell 或 `cmd.exe` 形式。
|
|
109
109
|
|
|
110
|
-
## 快速开始
|
|
111
|
-
|
|
112
|
-
1. (可选但推荐)先读一遍官方 Pi + DeepSeek 接入指南:[`pi_mono.zh-CN.md`](https://github.com/deepseek-ai/awesome-deepseek-agent/blob/main/docs/pi_mono.zh-CN.md)。它讲了 Pi 安装与基础配置。
|
|
113
|
-
2. 安装本扩展:
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
pi install npm:pi-cache-optimizer
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
3. 如果使用 DeepSeek 模型,请在运行 `pi` 的同一个 shell 中导出 DeepSeek API key:
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
export DEEPSEEK_API_KEY='...'
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
本扩展**不会**读取、存储或打印 key 的值。
|
|
126
|
-
|
|
127
110
|
## 安装
|
|
128
111
|
|
|
112
|
+
请先安装并配置好 Pi,然后安装本扩展:
|
|
113
|
+
|
|
129
114
|
```bash
|
|
130
115
|
pi install npm:pi-cache-optimizer
|
|
131
116
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-cache-optimizer",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Pi extension that improves provider-side KV/prompt cache hit rates (DeepSeek, OpenAI, Claude, Gemini) by reordering the system prompt, requesting long retention, and showing footer cache stats. Renamed from pi-deepseek-cache-optimizer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|