generic.d.ts 798 B

123456789101112131415161718192021
  1. import type { RunTreeConfig } from "../index.js";
  2. export declare const _wrapClient: <T extends object>(sdk: T, runName: string, options?: Omit<RunTreeConfig, "name">) => T;
  3. type WrapSDKOptions = Partial<RunTreeConfig & {
  4. /**
  5. * @deprecated Use `name` instead.
  6. */
  7. runName: string;
  8. }>;
  9. /**
  10. * Wrap an arbitrary SDK, enabling automatic LangSmith tracing.
  11. * Method signatures are unchanged.
  12. *
  13. * Note that this will wrap and trace ALL SDK methods, not just
  14. * LLM completion methods. If the passed SDK contains other methods,
  15. * we recommend using the wrapped instance for LLM calls only.
  16. * @param sdk An arbitrary SDK instance.
  17. * @param options LangSmith options.
  18. * @returns
  19. */
  20. export declare const wrapSDK: <T extends object>(sdk: T, options?: WrapSDKOptions) => T;
  21. export {};