-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding openai-function-and-web-scrapper (#362)
- Loading branch information
1 parent
71e6ece
commit c95ec39
Showing
11 changed files
with
155 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 13 additions & 4 deletions
17
JS/edgechains/arakoodev/src/arakooserver/src/lib/hono/hono.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { PdfLoader } from "./lib/pdf-loader/pdfLoader.js"; | ||
export { YoutubeLoader } from "./lib/youtube-video-transcript-loader/youtubeLoader.js" |
16 changes: 16 additions & 0 deletions
16
...ns/arakoodev/src/document-loader/src/lib/youtube-video-transcript-loader/youtubeLoader.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { YoutubeTranscript } from "youtube-transcript" | ||
|
||
export class YoutubeLoader { | ||
private videoUrl: string; | ||
private transcript: YoutubeTranscript[] | null; | ||
|
||
constructor(videoUrl: string) { | ||
this.videoUrl = videoUrl; | ||
this.transcript = null; | ||
} | ||
|
||
async loadTranscript() { | ||
this.transcript = await YoutubeTranscript.fetchTranscript(this.videoUrl); | ||
return this.transcript.map((t: any) => t.text).join(" "); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
JS/edgechains/arakoodev/src/middleware/src/tests/cors/cors.test.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import "dotenv/config"; | ||
|
||
export { ChatOpenAi } from "./lib/endpoints/OpenAiEndpoint.js"; | ||
export { OpenAI } from "./lib/endpoints/OpenAiEndpoint.js"; | ||
export { Stream } from "./lib/streaming/OpenAiStreaming.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { WebScraper } from "./lib/webScraper"; | ||
|
Oops, something went wrong.