parea-ai
Version:
Client SDK library to connect to Parea AI.
49 lines (48 loc) • 1.65 kB
TypeScript
import { LangchainRunCreate, TraceIntegrations, TraceLog, UpdateLog } from './types.js';
import { HTTPClient } from './api-client';
/**
* PareaLogger class for handling logging operations.
*/
export declare class PareaLogger {
private client;
private project_uuid;
constructor();
/**
* Sets the HTTP client for the logger.
* @param client - The HTTP client to be used for requests.
*/
setClient(client: HTTPClient): void;
/**
* Sets the project UUID for the logger.
* @param project_uuid - The project UUID to be set.
*/
setProjectUUID(project_uuid: string): void;
/**
* Retrieves the project UUID.
* @returns A promise that resolves to the project UUID.
*/
getProjectUUID(): Promise<string>;
/**
* Records a log entry.
* @param data - The trace log data to be recorded.
* @throws Will throw an error if the Parea Client is not instantiated.
*/
recordLog(data: TraceLog): Promise<void>;
/**
* Records a vendor-specific log entry.
* @param data - The Langchain run data to be recorded.
* @param vendor - The trace integration vendor.
* @throws Will throw an error if the Parea Client is not instantiated.
*/
recordVendorLog(data: LangchainRunCreate, vendor: TraceIntegrations): Promise<void>;
/**
* Updates an existing log entry.
* @param data - The update log data.
* @throws Will throw an error if the Parea Client is not instantiated.
*/
updateLog(data: UpdateLog): Promise<void>;
}
/**
* Singleton instance of PareaLogger.
*/
export declare const pareaLogger: PareaLogger;