✏️ fix typo

This commit is contained in:
Nate Sesti 2024-06-27 08:25:19 -07:00
parent 71ae746d53
commit a60a8d5701

View file

@ -15,11 +15,13 @@ class OpenAIEmbeddingsProvider extends BaseEmbeddingsProvider {
private _getEndpoint() {
if (!this.options.apiBase) {
throw new Error("No API base URL provided. Please set the 'apiBase' option in config.json");
throw new Error(
"No API base URL provided. Please set the 'apiBase' option in config.json",
);
}
this.options.apiBase = this.options.apiBase.endsWith("/")
? this.options.apiBase
this.options.apiBase = this.options.apiBase.endsWith("/")
? this.options.apiBase
: `${this.options.apiBase}/`;
if (this.options.apiType === "azure") {
@ -28,7 +30,7 @@ class OpenAIEmbeddingsProvider extends BaseEmbeddingsProvider {
this.options.apiBase,
);
}
return new URL("embedding", this.options.apiBase);
return new URL("embeddings", this.options.apiBase);
}
async embed(chunks: string[]) {