@kalera/munin-sdk 1.0.4 → 1.0.6
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/.turbo/turbo-build.log +1 -1
- package/dist/client.js +6 -2
- package/package.json +1 -1
- package/src/client.ts +6 -2
package/.turbo/turbo-build.log
CHANGED
package/dist/client.js
CHANGED
|
@@ -113,12 +113,16 @@ export class MuninClient {
|
|
|
113
113
|
const entities = (kg.entities || []).map((e) => {
|
|
114
114
|
if (e.embedding)
|
|
115
115
|
delete e.embedding;
|
|
116
|
-
return `${e.
|
|
116
|
+
return `${e.label || 'Unknown'} (${e.type || 'Unknown'}): ${e.description || ''}`;
|
|
117
117
|
});
|
|
118
|
+
// To make relationships readable without doing a separate map lookup,
|
|
119
|
+
// we use the sourceEntityId and targetEntityId directly or map if populated.
|
|
118
120
|
const relationships = (kg.relationships || []).map((r) => {
|
|
119
121
|
if (r.embedding)
|
|
120
122
|
delete r.embedding;
|
|
121
|
-
|
|
123
|
+
const source = r.sourceLabel || r.sourceEntityId || 'Unknown';
|
|
124
|
+
const target = r.targetLabel || r.targetEntityId || 'Unknown';
|
|
125
|
+
return `${source} -[${r.type || 'Unknown'}]-> ${target}`;
|
|
122
126
|
});
|
|
123
127
|
return {
|
|
124
128
|
summary: "GraphRAG knowledge formatted for readability",
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -153,12 +153,16 @@ export class MuninClient {
|
|
|
153
153
|
|
|
154
154
|
const entities = (kg.entities || []).map((e: any) => {
|
|
155
155
|
if (e.embedding) delete e.embedding;
|
|
156
|
-
return `${e.
|
|
156
|
+
return `${e.label || 'Unknown'} (${e.type || 'Unknown'}): ${e.description || ''}`;
|
|
157
157
|
});
|
|
158
158
|
|
|
159
|
+
// To make relationships readable without doing a separate map lookup,
|
|
160
|
+
// we use the sourceEntityId and targetEntityId directly or map if populated.
|
|
159
161
|
const relationships = (kg.relationships || []).map((r: any) => {
|
|
160
162
|
if (r.embedding) delete r.embedding;
|
|
161
|
-
|
|
163
|
+
const source = r.sourceLabel || r.sourceEntityId || 'Unknown';
|
|
164
|
+
const target = r.targetLabel || r.targetEntityId || 'Unknown';
|
|
165
|
+
return `${source} -[${r.type || 'Unknown'}]-> ${target}`;
|
|
162
166
|
});
|
|
163
167
|
|
|
164
168
|
return {
|