@elimeleth/builderbot-langchain
Version:
Interface para crear chatbot con Builderbot & LangChain
28 lines • 1.57 kB
TypeScript
import { Callbacks, Retriever, ModelArgs, ModelName, Store, RunnableConf } from "./types";
import { ZodType, ZodTypeDef } from "zod";
import { TFlow, BotContext, BotMethods } from "@builderbot/bot/dist/types";
import { Embeddings } from "@langchain/core/embeddings";
declare class createAIFlow {
private static kwrd;
private static schema;
private static model;
private static contextual;
private static store;
static setKeyword: (ev: any) => typeof createAIFlow;
static setAIModel: (ai?: {
modelName: ModelName;
args?: ModelArgs;
}) => typeof createAIFlow;
static setZodSchema: <T>(schema: ZodType<T, ZodTypeDef, T>) => typeof createAIFlow;
static setStore: (store: Partial<Store & Retriever>) => typeof createAIFlow;
static setCatchLayer: <T>(schema: ZodType<T, ZodTypeDef, T>, cb: (ctx: BotContext, methods: BotMethods) => Promise<void>, capture?: boolean) => typeof createAIFlow;
static setTransformLayer: <T>(schema: ZodType<T, ZodTypeDef, T>, cb: (ctx: BotContext, methods: BotMethods) => Promise<void>, capture?: boolean) => typeof createAIFlow;
static pipe: (fn: (flow: TFlow<any, any>) => TFlow<any, any>) => typeof createAIFlow;
static setContextual(k: number, similarityThreshold: number, model?: Embeddings): typeof createAIFlow;
static createRunnable: (opts?: RunnableConf, callbacks?: Callbacks) => typeof createAIFlow;
static createFlow: () => TFlow<any, any>;
}
export { createAIFlow };
export * from "./layers";
export * from "./flows";
//# sourceMappingURL=index.d.ts.map