code-graph-context 2.12.3 → 2.12.5
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
CHANGED
|
@@ -190,6 +190,7 @@ If you prefer to edit the config files directly:
|
|
|
190
190
|
| `NEO4J_USER` | No | `neo4j` | Neo4j username |
|
|
191
191
|
| `NEO4J_PASSWORD` | No | `PASSWORD` | Neo4j password |
|
|
192
192
|
| `EMBEDDING_MODEL` | No | `codesage/codesage-base-v2` | Local embedding model (see [Embedding Configuration](#embedding-configuration)) |
|
|
193
|
+
| `EMBEDDING_BATCH_SIZE` | No | `16` | Texts per embedding batch (lower = less memory, higher = faster) |
|
|
193
194
|
| `EMBEDDING_SIDECAR_PORT` | No | `8787` | Port for local embedding server |
|
|
194
195
|
| `EMBEDDING_DEVICE` | No | auto (`mps`/`cpu`) | Device for embeddings. Auto-detects MPS on Apple Silicon |
|
|
195
196
|
| `EMBEDDING_HALF_PRECISION` | No | `false` | Set `true` for float16 (uses ~0.5x memory) |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Local Embeddings Service
|
|
3
|
-
* Uses a Python sidecar running
|
|
3
|
+
* Uses a Python sidecar running CodeSage-Base-v2 (or configurable model).
|
|
4
4
|
* Default provider — no API key required.
|
|
5
5
|
*/
|
|
6
6
|
import { debugLog } from '../../mcp/utils.js';
|
|
7
7
|
import { getEmbeddingSidecar } from './embedding-sidecar.js';
|
|
8
8
|
const BATCH_CONFIG = {
|
|
9
|
-
maxBatchSize:
|
|
9
|
+
maxBatchSize: parseInt(process.env.EMBEDDING_BATCH_SIZE ?? '', 10) || 16,
|
|
10
10
|
};
|
|
11
11
|
export class LocalEmbeddingsService {
|
|
12
12
|
async embedText(text) {
|
package/package.json
CHANGED
package/sidecar/requirements.txt
CHANGED