@jackhua/mini-langchain
Version:
A lightweight TypeScript implementation of LangChain with cost optimization features
23 lines • 547 B
JavaScript
;
/**
* Base embeddings interface
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseEmbeddings = void 0;
/**
* Base embeddings class
*/
class BaseEmbeddings {
/**
* Batch texts for embedding
*/
batchTexts(texts, batchSize) {
const batches = [];
for (let i = 0; i < texts.length; i += batchSize) {
batches.push(texts.slice(i, i + batchSize));
}
return batches;
}
}
exports.BaseEmbeddings = BaseEmbeddings;
//# sourceMappingURL=base.js.map