diff --git a/core/indexing/embeddings/CohereEmbeddingsProvider.ts b/core/indexing/embeddings/CohereEmbeddingsProvider.ts index 05e248792..0668d49c4 100644 --- a/core/indexing/embeddings/CohereEmbeddingsProvider.ts +++ b/core/indexing/embeddings/CohereEmbeddingsProvider.ts @@ -1,4 +1,4 @@ -import fetch, { Response } from "node-fetch"; +import { Response } from "node-fetch"; import { EmbedOptions } from "../.."; import { withExponentialBackoff } from "../../util/withExponentialBackoff"; import BaseEmbeddingsProvider from "./BaseEmbeddingsProvider"; @@ -35,7 +35,7 @@ class CohereEmbeddingsProvider extends BaseEmbeddingsProvider { batchedChunks.map(async (batch) => { const fetchWithBackoff = () => withExponentialBackoff(() => - fetch(new URL("embed", this.options.apiBase), { + this.fetch(new URL("embed", this.options.apiBase), { method: "POST", body: JSON.stringify({ texts: batch,