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.
wrapSDK<T extends object>(sdk: T, options: Partial<RunTreeConfig __type>): T| Name | Type | Description |
|---|---|---|
sdk* | T | An arbitrary SDK instance. |
options | Partial<RunTreeConfig & __type> | LangSmith options. |