mongodb-rag-core
Version:
Common elements used by MongoDB Chatbot Framework components.
23 lines • 759 B
TypeScript
import OpenAI from "openai";
import { Embedder } from "./Embedder";
import { BackoffOptions } from "exponential-backoff";
export type MakeOpenAiEmbedderArgs = {
/**
Options used for automatic retry (usually due to rate limiting).
*/
backoffOptions?: BackoffOptions;
/**
The deployment key.
*/
deployment: string;
/**
The OpenAI client.
*/
openAiClient: OpenAI;
};
/**
Constructor for implementation of the {@link Embedder} using [OpenAI
Embeddings API](https://platform.openai.com/docs/guides/embeddings).
*/
export declare const makeOpenAiEmbedder: ({ backoffOptions: backoffOptionsIn, deployment, openAiClient, }: MakeOpenAiEmbedderArgs) => Embedder;
//# sourceMappingURL=OpenAiEmbedder.d.ts.map