@blaxel/llamaindex 0.2.36-preview.80 → 0.2.36
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/dist/cjs/.tsbuildinfo +1 -0
- package/dist/cjs/telemetry.js +58 -0
- package/dist/{tools.d.ts → cjs/types/tools.d.ts} +1 -1
- package/dist/esm/.tsbuildinfo +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/model.js +135 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/telemetry.js +23 -0
- package/dist/esm/tools.js +25 -0
- package/package.json +17 -26
- package/dist/telemetry.js +0 -25
- /package/dist/{index.js → cjs/index.js} +0 -0
- /package/dist/{model.js → cjs/model.js} +0 -0
- /package/dist/{tools.js → cjs/tools.js} +0 -0
- /package/dist/{index.d.ts → cjs/types/index.d.ts} +0 -0
- /package/dist/{model.d.ts → cjs/types/model.d.ts} +0 -0
- /package/dist/{telemetry.d.ts → cjs/types/telemetry.d.ts} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const core_1 = require("@blaxel/core");
|
|
37
|
+
const instrumentation_1 = require("@opentelemetry/instrumentation");
|
|
38
|
+
// Safely initialize LlamaIndex telemetry instrumentation
|
|
39
|
+
async function initializeTelemetry() {
|
|
40
|
+
try {
|
|
41
|
+
const { LlamaIndexInstrumentation } = await Promise.resolve().then(() => __importStar(require("@traceloop/instrumentation-llamaindex")));
|
|
42
|
+
const llamaindex = new LlamaIndexInstrumentation();
|
|
43
|
+
// Try to enable the instrumentation
|
|
44
|
+
llamaindex.enable();
|
|
45
|
+
(0, instrumentation_1.registerInstrumentations)({
|
|
46
|
+
instrumentations: [llamaindex],
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
// Log the error but don't crash the application
|
|
51
|
+
core_1.logger.warn("LlamaIndex telemetry instrumentation failed to initialize:", error instanceof Error ? error.message : String(error));
|
|
52
|
+
core_1.logger.warn("Continuing without LlamaIndex-specific telemetry...");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Initialize telemetry asynchronously
|
|
56
|
+
initializeTelemetry().catch((error) => {
|
|
57
|
+
core_1.logger.warn("Failed to initialize telemetry:", error instanceof Error ? error.message : String(error));
|
|
58
|
+
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ToolOptions } from "@blaxel/core
|
|
1
|
+
import { ToolOptions } from "@blaxel/core";
|
|
2
2
|
export declare const blTool: (name: string, options?: ToolOptions | number) => Promise<import("llamaindex").FunctionTool<unknown, import("llamaindex").JSONValue | Promise<import("llamaindex").JSONValue>, object>[]>;
|
|
3
3
|
export declare const blTools: (names: string[], ms?: number) => Promise<import("llamaindex").FunctionTool<unknown, import("llamaindex").JSONValue | Promise<import("llamaindex").JSONValue>, object>[]>;
|