From 2a2bf682bf4055691bb53b671444dbb4016b3086 Mon Sep 17 00:00:00 2001
From: yisding <yi.s.ding@gmail.com>
Date: Tue, 21 Nov 2023 21:44:58 -0800
Subject: [PATCH] small fix in example

---
 apps/simple/assemblyai.ts | 24 +++++++++++++-----------
 examples/assemblyai.ts    | 26 ++++++++++++++------------
 2 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/apps/simple/assemblyai.ts b/apps/simple/assemblyai.ts
index 697e83073..d03338063 100644
--- a/apps/simple/assemblyai.ts
+++ b/apps/simple/assemblyai.ts
@@ -1,5 +1,5 @@
 import { program } from "commander";
-import { AudioTranscriptReader, CreateTranscriptParameters } from "../../packages/core/src/readers/AssemblyAI";
+import { AudioTranscriptReader, CreateTranscriptParameters } from "llamaindex";
 import { stdin as input, stdout as output } from "node:process";
 // readline/promises is still experimental so not in @types/node yet
 // @ts-ignore
@@ -7,28 +7,30 @@ import readline from "node:readline/promises";
 import { VectorStoreIndex } from "../../packages/core/src/indices";
 
 program
-  .option("-a, --audio-url [string]", "URL or path of the audio file to transcribe")
-  .option('-i, --transcript-id [string]', "ID of the AssemblyAI transcript")
+  .option(
+    "-a, --audio-url [string]",
+    "URL or path of the audio file to transcribe",
+  )
+  .option("-i, --transcript-id [string]", "ID of the AssemblyAI transcript")
   .action(async (options) => {
     if (!process.env.ASSEMBLYAI_API_KEY) {
-      console.log(
-        "No ASSEMBLYAI_API_KEY found in environment variables.",
-      );
+      console.log("No ASSEMBLYAI_API_KEY found in environment variables.");
       return;
     }
 
     const reader = new AudioTranscriptReader();
     let params: CreateTranscriptParameters | string;
-    console.log(options)
+    console.log(options);
     if (options.audioUrl) {
       params = {
-        audio_url: options.audioUrl
+        audio_url: options.audioUrl,
       };
     } else if (options.transcriptId) {
       params = options.transcriptId;
-    }
-    else {
-      console.log("You must provide either an --audio-url or a --transcript-id");
+    } else {
+      console.log(
+        "You must provide either an --audio-url or a --transcript-id",
+      );
       return;
     }
 
diff --git a/examples/assemblyai.ts b/examples/assemblyai.ts
index 283b4f308..d03338063 100644
--- a/examples/assemblyai.ts
+++ b/examples/assemblyai.ts
@@ -1,34 +1,36 @@
 import { program } from "commander";
+import { AudioTranscriptReader, CreateTranscriptParameters } from "llamaindex";
 import { stdin as input, stdout as output } from "node:process";
 // readline/promises is still experimental so not in @types/node yet
 // @ts-ignore
 import readline from "node:readline/promises";
-import { AudioTranscriptReader, CreateTranscriptParameters } from "../packages/core/src/readers/AssemblyAI";
-import { VectorStoreIndex } from "../packages/core/src/indices";
+import { VectorStoreIndex } from "../../packages/core/src/indices";
 
 program
-  .option("-a, --audio-url [string]", "URL or path of the audio file to transcribe")
-  .option('-i, --transcript-id [string]', "ID of the AssemblyAI transcript")
+  .option(
+    "-a, --audio-url [string]",
+    "URL or path of the audio file to transcribe",
+  )
+  .option("-i, --transcript-id [string]", "ID of the AssemblyAI transcript")
   .action(async (options) => {
     if (!process.env.ASSEMBLYAI_API_KEY) {
-      console.log(
-        "No ASSEMBLYAI_API_KEY found in environment variables.",
-      );
+      console.log("No ASSEMBLYAI_API_KEY found in environment variables.");
       return;
     }
 
     const reader = new AudioTranscriptReader();
     let params: CreateTranscriptParameters | string;
-    console.log(options)
+    console.log(options);
     if (options.audioUrl) {
       params = {
-        audio_url: options.audioUrl
+        audio_url: options.audioUrl,
       };
     } else if (options.transcriptId) {
       params = options.transcriptId;
-    }
-    else {
-      console.log("You must provide either an --audio-url or a --transcript-id");
+    } else {
+      console.log(
+        "You must provide either an --audio-url or a --transcript-id",
+      );
       return;
     }
 
-- 
GitLab