Skip to content

Commit

Permalink
fix: ts ignore is needed after all
Browse files Browse the repository at this point in the history
  • Loading branch information
tazarov committed May 4, 2024
1 parent 4b2e310 commit 58b0f1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clients/js/src/embeddings/OpenAIEmbeddingFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ export class OpenAIEmbeddingFunction implements IEmbeddingFunction {
private async getOpenAIClient(): Promise<OpenAIAPI> {
if (this.openaiApi) return this.openaiApi;
try {
// @ts-ignore - we need to dynamically import the openai package without TS errors
OpenAIApi = await import("openai");
// @ts-ignore - we need to dynamically import the openai package without TS errors
this.openaiApi = await import("openai/version")
.catch(() => ({ VERSION: "3" }))
.then(({ VERSION }) => {
Expand Down

0 comments on commit 58b0f1a

Please sign in to comment.