UNPKG

@n8n/n8n-nodes-langchain

Version:
42 lines (41 loc) • 1.37 kB
import { type IDataObject } from 'n8n-workflow'; import type { CollectedTrace } from './types'; export interface MlflowResponse { status: number; body: unknown; } export type MlflowRequest = (options: { method: 'GET' | 'POST'; path: string; qs?: Record<string, string>; body?: IDataObject; }) => Promise<MlflowResponse>; export type SignedUpload = (options: { url: string; body: string; }) => Promise<void>; export interface TraceWriterOptions { request: MlflowRequest; upload: SignedUpload; experimentId: string; } export declare function defaultExperimentName(workflowId: string): string; export declare function ensureExperiment(request: MlflowRequest, experimentName: string): Promise<string>; export declare function buildTraceInfo(trace: CollectedTrace, experimentId: string): { trace_id: string; client_request_id: string | undefined; trace_location: { type: string; mlflow_experiment: { experiment_id: string; }; }; request_preview: string; response_preview: string; request_time: string; execution_duration: string; state: import("./types").MlflowStatusCode; trace_metadata: Record<string, string>; tags: Record<string, string>; }; export declare function writeTrace(options: TraceWriterOptions, trace: CollectedTrace): Promise<void>;