@odla-ai/kg 0.1.1 → 0.1.2
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 +5 -1
- package/llms.txt +6 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -42,9 +42,13 @@ import {
|
|
|
42
42
|
// 1. Your ontology is data (see the OSINT example in examples/kg-demo).
|
|
43
43
|
const ontology: Ontology = { entities: { /* … */ }, edges: { /* … */ } };
|
|
44
44
|
|
|
45
|
-
// 2. Wire the host services once.
|
|
45
|
+
// 2. Wire the host services once. Env-var keys work standalone…
|
|
46
46
|
const db = init({ appId, adminToken, endpoint });
|
|
47
47
|
const provider = getProvider({ LLM_PROVIDER: "claude", ANTHROPIC_API_KEY: key });
|
|
48
|
+
// …but platform apps should bring a configured Ai instead (no LLM keys in
|
|
49
|
+
// worker env): createProvider({ provider: "claude", ai }) with the ai from
|
|
50
|
+
// @odla-ai/ai's initFromPlatform — see examples/kg-demo/src/deps.ts. The
|
|
51
|
+
// platform's default model is ignored here; kg's MODEL_TIERS govern verbs.
|
|
48
52
|
const deps: PipelineDeps = { db, provider, ontology, extract: myExtractor, store: new Store(kv) };
|
|
49
53
|
|
|
50
54
|
// 3. Run items through the shared pipeline (or call writeFragment directly).
|
package/llms.txt
CHANGED
|
@@ -44,9 +44,13 @@ import {
|
|
|
44
44
|
// 1. Your ontology is data (see the OSINT example in examples/kg-demo).
|
|
45
45
|
const ontology: Ontology = { entities: { /* … */ }, edges: { /* … */ } };
|
|
46
46
|
|
|
47
|
-
// 2. Wire the host services once.
|
|
47
|
+
// 2. Wire the host services once. Env-var keys work standalone…
|
|
48
48
|
const db = init({ appId, adminToken, endpoint });
|
|
49
49
|
const provider = getProvider({ LLM_PROVIDER: "claude", ANTHROPIC_API_KEY: key });
|
|
50
|
+
// …but platform apps should bring a configured Ai instead (no LLM keys in
|
|
51
|
+
// worker env): createProvider({ provider: "claude", ai }) with the ai from
|
|
52
|
+
// @odla-ai/ai's initFromPlatform — see examples/kg-demo/src/deps.ts. The
|
|
53
|
+
// platform's default model is ignored here; kg's MODEL_TIERS govern verbs.
|
|
50
54
|
const deps: PipelineDeps = { db, provider, ontology, extract: myExtractor, store: new Store(kv) };
|
|
51
55
|
|
|
52
56
|
// 3. Run items through the shared pipeline (or call writeFragment directly).
|
|
@@ -76,7 +80,7 @@ scalar attrs per the ontology's rules (`replace` / `prefer` / `earliest` /
|
|
|
76
80
|
`latest`), never writes `human`-owned attrs, and commits nodes-then-links in a
|
|
77
81
|
single idempotent transaction (deterministic `mutationId`).
|
|
78
82
|
|
|
79
|
-
## API reference (generated from dist/index.d.ts, v0.1.
|
|
83
|
+
## API reference (generated from dist/index.d.ts, v0.1.2)
|
|
80
84
|
|
|
81
85
|
```ts
|
|
82
86
|
import { Value, Op, AdminDb, SerializedAttr, Cardinality, SerializedSchema, Entity } from '@odla-ai/db';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odla-ai/kg",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Ontology-driven knowledge-graph builder: pluggable source connectors, LLM extraction against a config-as-data ontology, and a provenance-preserving graph writer persisting into odla-db.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"prepublishOnly": "npm run build && npm run gen:llms"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@odla-ai/ai": "^0.
|
|
48
|
+
"@odla-ai/ai": "^0.2.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@odla-ai/db": "^0.4.0"
|