import type * as CallbackManagerModuleV02 from "@langchain/core/callbacks/manager";
import type * as CallbackManagerModuleV01 from "@langchain/coreV0.1/callbacks/manager";
import { OITracer } from "@arizeai/openinference-core";
/**
 * Adds the {@link LangChainTracer} to the callback handlers if it is not already present
 * @param tracer the {@link tracer} to pass into the {@link LangChainTracer} when added to handlers
 * @param handlers the LangChain callback handlers which may be an array of handlers or a CallbackManager
 * @returns the callback handlers with the {@link LangChainTracer} added
 *
 * If the handlers are an array, we add the tracer to the array if it is not already present
 *
 * There are some slight differences in the CallbackHandler interface between V0.1 and v0.2
 * So we have to cast our tracer to any to avoid type errors
 * We support both versions and our tracer is compatible with either as it will extend the BaseTracer from the installed version which will be the same as the version of handlers passed in here
 */
export declare function addTracerToHandlers(tracer: OITracer, handlers?: CallbackManagerModuleV01.Callbacks): CallbackManagerModuleV01.Callbacks;
export declare function addTracerToHandlers(tracer: OITracer, handlers?: CallbackManagerModuleV02.Callbacks): CallbackManagerModuleV02.Callbacks;
//# sourceMappingURL=instrumentationUtils.d.ts.map