agsamantha/node_modules/langsmith/dist/wrappers/generic.d.ts
2024-10-02 15:15:21 -05:00

21 lines
798 B
TypeScript

import type { RunTreeConfig } from "../index.js";
export declare const _wrapClient: <T extends object>(sdk: T, runName: string, options?: Omit<RunTreeConfig, "name">) => T;
type WrapSDKOptions = Partial<RunTreeConfig & {
/**
* @deprecated Use `name` instead.
*/
runName: string;
}>;
/**
* Wrap an arbitrary SDK, enabling automatic LangSmith tracing.
* Method signatures are unchanged.
*
* Note that this will wrap and trace ALL SDK methods, not just
* LLM completion methods. If the passed SDK contains other methods,
* we recommend using the wrapped instance for LLM calls only.
* @param sdk An arbitrary SDK instance.
* @param options LangSmith options.
* @returns
*/
export declare const wrapSDK: <T extends object>(sdk: T, options?: WrapSDKOptions) => T;
export {};