export type JLINCTracerFields = { dataStoreApiUrl?: string | undefined; dataStoreApiKey?: string | undefined; archiveApiUrl?: string | undefined; archiveApiKey?: string | undefined; systemPrefix?: string | undefined; agreementId?: string | null | undefined; debug?: boolean | undefined; }; export type SerializedRun = { name?: string | undefined; start_time?: number | undefined; end_time?: number | undefined; trace_id?: string | undefined; inputs?: any; outputs?: any; extra?: { metadata?: { ls_provider?: string; ls_model_name?: string; }; } | undefined; }; /** * @typedef {Object} JLINCTracerFields * @property {string} [dataStoreApiUrl] * @property {string} [dataStoreApiKey] * @property {string} [archiveApiUrl] * @property {string} [archiveApiKey] * @property {string} [systemPrefix] * @property {string|null} [agreementId] * @property {boolean} [debug] */ /** * @typedef {Object} SerializedRun * @property {string} [name] * @property {number} [start_time] * @property {number} [end_time] * @property {string} [trace_id] * @property {any} [inputs] * @property {any} [outputs] * @property {{ metadata?: { ls_provider?: string, ls_model_name?: string } }} [extra] */ /** * @extends {LangChainTracer} */ export class JLINCTracer extends LangChainTracer { /** * @param {JLINCTracerFields} [fields={}] */ constructor(fields?: JLINCTracerFields); /** @type {string} */ dataStoreApiUrl: string; /** @type {string} */ dataStoreApiKey: string; /** @type {string} */ archiveApiUrl: string; /** @type {string} */ archiveApiKey: string; /** @type {string} */ systemPrefix: string; /** @type {string|null} */ agreementId: string | null; /** @type {boolean} */ debug: boolean; /** @type {string|null} */ domain: string | null; /** @type {Set} */ entities: Set; /** * @param {any} run * @returns {Promise} */ onRunCreate(run: any): Promise; /** * @param {any} run * @returns {Promise} */ onRunUpdate(run: any): Promise; /** * @returns {Promise} */ getDefaultProjectName(): Promise; /** * @param {SerializedRun} serialized * @returns {Promise} */ onLLMStart(serialized: SerializedRun): Promise; /** * @param {SerializedRun} serialized * @returns {Promise} */ onLLMEnd(serialized: SerializedRun): Promise; /** * @param {SerializedRun} serialized * @returns {Promise} */ onToolStart(serialized: SerializedRun): Promise; /** * @param {SerializedRun} serialized * @returns {Promise} */ onToolEnd(serialized: SerializedRun): Promise; /** * @param {string} dir * @param {any} payload * @returns {Promise} */ _postToApi(dir: string, payload: any): Promise; /** * @param {string} entityShortName * @returns {Promise} */ _setEntity(entityShortName: string): Promise; /** * @param {string} input * @returns {string} */ _sanitize(input: string): string; /** * @param {any} payload * @param {'in' | 'out'} direction * @returns {Promise} */ _jlincTrace(payload: any, direction: "in" | "out"): Promise; } import { LangChainTracer } from "@langchain/core/dist/tracers/tracer_langchain";